Currently in our gulpfile.js we have every single JS file being .scripts() 'ed.
We want to transfer from each single file, to a more logical one. Using something like a foreach loop that loops through all javascript files within a given directory, copy them to public/js then minify them with any plugin, and .version() them so they're in a build folder.
How can you foreach all those files and what would be a logical step to minify + version the files?
To concatenate and minify, do this
Although minification will only occur when you run
gulp --production.To version your assets, use the
elixir()helper in your views. It's in the docs.