Front-end assets are built with Gulp 4 task runner.
Requirements:
Use $ sh ./build.sh
to build all templates and front-end assets.
All front-end assets are placed in resources
directory:
- resources
- images
- js
- scss
- svg
Images are optimized to save data during load. Progressive JPEG is used to improve perceived loading speed.
CSS source is written in SCSS according to Bootstrap naming conventions.
JavaScript is written in ES 6. Custom JS is concatenated with jQuery, Popper.js and Bootstrap JS and served as a single file.
SVG symbols are created from individual SVG files. Use $ gulp make-svg-sprites
to update actual
SVG output used in templates.
- Run a web server in
web
directory, eg.$ php -S 0.0.0.0:8000
. Content ofweb
directory is now served athttp://localhost:8000
. - In the project root directory, run
$ gulp serve
. This:- builds templates and front-end assets
- starts watching over source files in
resources
and HTML files for changes to run appropriate Gulp tasks - starts BrowserSync at
http://localhost:3000