This is an extended version of nette/sandbox focused on fast development with modern PHP and JS tools.
Wiki explains how to use present technologies with Nette Framework.
This sandbox is currently based on
Nette 2.4 due to incompatibility of some extensions with
sudo npm install --global gulp-cli
Create a new project using composer
composer create-project webrouse/n-sandbox path/to/install cd path/to/install
serve task and profit
http://localhost:3000/checker to check minimal requirements, if some issues, install the missing extensions.
http://localhost:3000 in your browser to see the welcome page.
- includes default and watch tasks
- checks coding standards for
scssfiles and other assets
- runs the PHP built-in webserver on
localhost:8000using project php.ini
- runs Browsersync server on
localhost:3000that proxy requests to the PHP server
- watches for changes and then check + recompile assets
You can append
--silent to suppress unnecessary output
gulp serve --silent
You can append
--fix flag to automatically fix coding standards issues:
gulp --fix gulp lint --fix gulp serve --fix
To one-shot assets check and compilation run the
- Gulp task runner
- Cache busting of all assets with gulp-rev and n-asset-macro
- EsLint with Airbnb JS rules check scripts coding standards
- UglifyEs compresses scripts in production mode
- Nittro client-side framework for Nette
- Sass compiles scss stylesheets to css
- SassLint + Airbnb CSS rules check styles coding standards
- Autoprefixer adds css vendor prefixes according to your browserslist config
- Cssnano compresses css in production mode
- Source maps
- Browsersync for synchronised development and testing in multiple browsers and devices
- ECS checks nette/coding-standard in PHP files
- Menu component extension
- Monolog extension for simple logging to various targets
- Git hooks mapped to gulp tasks
- SVG icons
- Favicon and touch icons generation from SVG
Wiki explains how to use present technologies and tools.
Any improvements to the code or documentation are welcome.
The goal is to create a skeleton that allows comfortable development without affecting the application speed.
Create test for each Gulp task with shunit2.
Nette: New BSD License or GPL 2.0 or 3.0