material_admin icon indicating copy to clipboard operation
material_admin copied to clipboard

Set up gulp to allow for dev and production environements

Open briancwald opened this issue 8 years ago • 0 comments

To increase performance we should be concatenating and minify our CSS/JS for the theme. Using a tool like Gulp Util will allow us to set a --production flag which we can run various tasks:

  • Concat all top level JS files in /js/ folder into a single file.
  • Minify the JS
  • Remove the sourcemaps from the material_admin.css
  • Minify material_admin.css

Preliminary manual tests show that it's about a 600ms increase in page load.

Problem:

If we minify the js/css and set the libraries.yml to point to the production files, how can we easily switch between that version and the development version locally without manually editing the .yml file?

briancwald avatar Sep 13 '17 11:09 briancwald