Skip to content
This repository was archived by the owner on Jan 23, 2018. It is now read-only.

Gulp Elixir

Sam Rapaport edited this page Jun 26, 2016 · 1 revision

Your Sass and JavaScript assets reside in the resources/assets/sass and resources/assets/js directories, respectively. Run gulp watch to automatically compile your Sass and JavaScript assets. Every time you modify and save an existing Sass or JavaScript file in the resources/assets directory, it will be compiled and saved into public/css and public/js and automatically included in your layouts.base view. To minify your compiled assets, just add the --production flag after the gulp command.

If you need to install additional NPM packages, simply run the npm install as usual, then edit the dependencies.scripts array in the gulpfile by adding the path to the new dependency. Then run gulp to recompile all your assets. (Note: npm scripts are compiled separate from asset scripts. They are compiled into public/js/dependencies.js and included in the base Blade view right before main.js)

Clone this wiki locally