Download the PHP package microstudi/silex-grunt-skeleton without Composer
On this page you can find all versions of the php package microstudi/silex-grunt-skeleton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download microstudi/silex-grunt-skeleton
More information about microstudi/silex-grunt-skeleton
Files in microstudi/silex-grunt-skeleton
Package silex-grunt-skeleton
Short Description A pre-configured skeleton for the Silex microframework with Grunt tasks added
License MIT
Informations about the package silex-grunt-skeleton
ABOUT
Just another Silex-Framework Skeleton
This is a port from the https://github.com/silexphp/Silex-Skeleton with this features added:
- Built-in PHP server (minimum version required 5.4)
- Livereloading for any css, js, or php file changes
- Demo class with view, phpunit test and route
- Grunt for automating tasks
- Bower to install javascript packages (currently jQuery, Modernizr)
Installation
GRUNT, BOWER & COMPOSER
This tools are required to use this project:
-
Grunt is a Javascript task runner that helps to execute repetitive tasks such as:
- Javascript minification
- CSS minification
- Image optimizations
- Package installers
- Code checks and tests
- ... so on ...
-
Bower is a dependency manager for common Javascript libraries
- Composer is a dependency manager for common PHP libraries
Installing grunt and bower
Grunt is a scripting task tool installable through npm, the Node.js.
If you want to install nodejs, grunt and bower on Ubuntu 12.04 or 14.04 for the very first time just do:
Additionally, you may remove the configuration npm user directory to avoid unexpected permissions problems when using npm as non root user afterwards:
To install Composer on Ubuntu or any other *nix execute this commands:
For other OS, please refer to the official install guides:
Install Grunt: http://gruntjs.com/getting-started Install Bower: http://bower.io/#install-bower Install Composer: https://getcomposer.org/doc/00-intro.md
Using grunt
Once you have your copy of Grunt installed you need to install the tasks runners used. To do so you may just execute in the path where you have your copy of the Silex-Skeleton code:
Using bower
Once you have your copy of Bower installed you need to download/update the needed Javascript libraries. To do so you may just execute in the path where you have your copy of the Silex-Skeleton code:
Using composer
Once you have your copy of Composer installed you need to download/update the needed PHP libraries. To do so you may just execute in the path where you have your copy of the Silex-Skeleton code:
After that you're ready to execute any of the task available in the same directory:
Grunt commands
-
Default task:
grunt
This task is the same as execute as doing:grunt lint
It performs static code analysis in order to quick detect mistakes or misspellings -
Code linter:
grunt lint
Same as default task -
Wiredep
grunt wiredep
This task is to add into the specified layouts the bower components Should be executed manually every time a bower library is installed -
build
grunt build
Builds the project into the dist folder. Production web server should point to the "dist/web" folder -
serve
grunt serve
Starts an instance of the PHP builtin server with livereload pointing to the development folder "web" -
serve:dist
grunt serve:dist
Builds the project and starts an instance of the PHP builtin server with livereload pointing to the production folder "web" -
precommit
grunt precommit
This task could be usefull if you want to add it to the pre-commit git hook. Executes the lint tasks for a a modified files only so you'll prevent from commiting broken files:Content of
.git/hooks/pre-commit
:Remember to make it executable:
$ chmod +x .git/hooks/pre-commit
TODO:
- adding optional yml config for assets path (cdn, jquery cdn or cdnfy), google analytics, etc
- add phpunit to grunt
- add translations
- doctrine
All versions of silex-grunt-skeleton with dependencies
silex/silex Version ~1.3
silex/web-profiler Version ^1.0
symfony/class-loader Version ^2.8
symfony/config Version ^2.8
symfony/console Version ~2.8
symfony/debug Version ~2.8
symfony/finder Version ~2.8
symfony/form Version ~2.8
symfony/monolog-bridge Version ~2.8
symfony/process Version ~2.8
symfony/security Version ~2.8
symfony/translation Version ~2.8
symfony/twig-bridge Version ~2.8
symfony/validator Version ~2.8
symfony/http-kernel Version ^2.8
twig/extensions Version ^1.3