Reorganized the bootstrap app to prepare it as a separate composer package.

This commit is contained in:
Qiang Xue
2013-05-18 21:54:03 -04:00
parent ff1b258411
commit 7dc624d1da
34 changed files with 101 additions and 19 deletions

View File

@@ -0,0 +1,44 @@
{
"name": "yiisoft/yii2-bootstrap",
"description": "Yii 2 Bootstrap Application",
"keywords": ["yii", "framework", "bootstrap"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"config": {
"vendor-dir": "vendor"
},
"bin": [
"yii"
],
"minimum-stability": "dev",
"repositories": [
{
"type": "package",
"package": {
"name": "bestiejs/punycode.js",
"version": "1.2.1",
"dist": {
"url": "https://github.com/bestiejs/punycode.js/archive/1.2.1.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/bestiejs/punycode.js.git",
"type": "git",
"reference": "tags/1.2.1"
}
}
}
],
"require": {
"php": ">=5.3.0",
"yiisoft/yii2": "dev-master"
}
}

View File

@@ -1,14 +0,0 @@
<?php
// comment out the following line to disable debug mode
defined('YII_DEBUG') or define('YII_DEBUG', true);
$frameworkPath = __DIR__ . '/../../yii';
require($frameworkPath . '/Yii.php');
// Register Composer autoloader
@include($frameworkPath . '/vendor/autoload.php');
$config = require(__DIR__ . '/protected/config/main.php');
$application = new yii\web\Application($config);
$application->run();

View File

@@ -1 +0,0 @@
deny from all

40
apps/bootstrap/readme.md Normal file
View File

@@ -0,0 +1,40 @@
Yii 2 Bootstrap Application
===========================
** NOTE ** Yii 2 and the relevant applications and extensions are still under heavy
development. We may make significant changes without prior notices. Please do not
use them for production. Please consider using [Yii v1.1](https://github.com/yiisoft/yii)
which is production ready.
Thank you for choosing Yii 2 - the new generation of high-performance PHP framework.
The Yii 2 Bootstrap Application is a Web application template that you can easily customize
to fit for your needs. It is particularly suitable for small Websites which mainly contain
a few informational pages.
DIRECTORY STRUCTURE
-------------------
commands/ contains console commands (controllers)
config/ contains application configurations
controllers/ contains Web controller classes
models/ contains model classes
runtime/ contains files generated during runtime
vendor/ contains dependent 3rd-party packages
views/ contains view files for the Web application
www/ contains the entry script and Web resources
REQUIREMENTS
------------
The minimum requirement by Yii is that your Web server supports PHP 5.3.?.
INSTALLATION
------------

View File

@@ -11,7 +11,7 @@
*/ */
// you may need to adjust this path to the correct Yii framework path // you may need to adjust this path to the correct Yii framework path
$frameworkPath = dirname(__FILE__) . '/../../../yii'; $frameworkPath = dirname(__FILE__) . '/../../yii';
require_once($frameworkPath . '/requirements/YiiRequirementChecker.php'); require_once($frameworkPath . '/requirements/YiiRequirementChecker.php');
$requirementsChecker = new YiiRequirementChecker(); $requirementsChecker = new YiiRequirementChecker();

1
apps/bootstrap/www/assets/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,12 @@
<?php
// comment out the following line to disable debug mode
defined('YII_DEBUG') or define('YII_DEBUG', true);
require(__DIR__ . '/../vendor/yiisoft/yii2/yii/yii.php');
require(__DIR__ . '/../vendor/autoload.php');
$config = require(__DIR__ . '/../config/main.php');
$application = new yii\web\Application($config);
$application->run();

View File

@@ -13,7 +13,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true);
// fcgi doesn't have STDIN defined by default // fcgi doesn't have STDIN defined by default
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r')); defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
$frameworkPath = __DIR__ . '/../../../yii'; $frameworkPath = __DIR__ . '/../../yii';
require($frameworkPath . '/Yii.php'); require($frameworkPath . '/Yii.php');