generator-symfonic-assets

Generator for setting up asset generation through Gulp with various frameworks for Symfony PHP projects.

Usage no npm install needed!

<script type="module">
  import generatorSymfonicAssets from 'https://cdn.skypack.dev/generator-symfonic-assets';
</script>

README

generator-symfonic-assets NPM version

Generator for setting up asset generation for Symfony PHP projects.

Installation

First install node.js, Gulp and Bower if you haven't already. Then install Yeoman and generator-symfonic-assets using npm.

npm install -g yo
npm install -g generator-symfonic-assets

Then change into a fresh Symfony PHP project folder:

yo symfonic-assets

ATTENTION

This generator is made for the sole purpose of generating front end assets for Symfony PHP framework projects, so it's mandatory to have a fresh Symfony project ready

After installing all dependencies please run gulp jslibs first to concatenate and compress all the JS libraries. Feel free to run this command again any time you add a new library (either through Bower or manually).

Available Gulp tasks

Default Task
This is run when you enter gulp on the command line. It starts Symfony's development server, dumps all assets from other bundles and takes care about starting up BrowserSync and compiling all the assets.

Compile all the things

Images Task
Running gulp images optimizes all the images from the web-src/images directory and copies them into the web/images folder.

Sass-Lint Task
gulp sass-lint lints all the given Sass files, configured through paths.scss.lint.

JSLibs Task
gulp jslibs concatenates and minifies all the given JS libraries - configured through paths.js.libs - and puts them into the target directory. This must be run after Yeoman initially and every time a JS library (external) is added.

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

License

MIT © Nils Butenschòˆn