variarty / yii-template
Another Yii2 template
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.0.0
- yidas/yii2-composer-bower-skip: ~2.0.13
- yiisoft/yii2: ~2.0.13
- yiisoft/yii2-bootstrap: ~2.0.7
- yiisoft/yii2-queue: ~2.0.2
- yiisoft/yii2-swiftmailer: ~2.0.7
Requires (Dev)
- yiisoft/yii2-debug: ~2.0.13
- yiisoft/yii2-faker: ~2.0.3
- yiisoft/yii2-gii: ~2.0.6
This package is not auto-updated.
Last update: 2024-11-07 00:16:44 UTC
README
This Project Template is another skeleton Yii 2 for creating projects. The template contains the basic features including user sign in/up and a password recovery page.
DIRECTORY STRUCTURE
app
assets/ contains application assets such as JavaScript and CSS
config/ contains application configurations
controllers/ contains Web controller classes
forms/ contains Web form classes
messages/ contains message translation
runtime/ contains files generated during runtime
views/ contains view files for the Web application
web/ contains the entry script and Web resources
widgets/ contains GUI widgets
common
config/ contains shared configurations
entities/ contains etities classes
jobs/ contains jobs (tasks)
mail/ contains view files for e-mails
messages/ contains shared messages (core)
migrations/ contains database migrations
repositories/ contains classes for working with the database
services/ contains services classes
console
commands/ contains console controllers
config/ contains console configurations
runtime/ contains files generated during runtime
tests
runtime/ contains files generated during runtime
unit/ contains unit tests
vendor/ contains dependent 3rd-party packages
REQUIREMENTS
- PHP >= 7.0
- PHPUnit >= 6.0 (for tests running only)
- Bower
- Npm
- Gulp
INSTALLATION
Install via Composer
If you do not have Composer, you may install it by following the instructions at getcomposer.org.
You can then install this project template using the following command:
php composer.phar create-project --prefer-dist variarty/yii-tempate app
cd app
npm install
bower install
Web resources building
Gulp is used to build web resources (css, js, etc.). Gulp has several tasks:
gulp help task (get available tasks with description)
gulp less transform app less to css
gulp js copy app JS to dist directory
gulp bootstrap build Twitter Bootstrap with custom overrides
gulp build run `less`, `js`, `bootstrap` tasks
gulp watch watch resources src directory and run 'build' task on change
Phing usage
If you have Phing you can run phing
in your application directory. Phing will run the commands:
composer install
npm install
bower install
gulp build
TESTING
Tests are located in tests
directory. They are developed with PHPUnit. Tests can be executed by running
phpunit
The command above will execute unit tests. Now, unit tests are testing only entities.