thaliproject / postcardapp

A sample app to demonstrate how to build Thali applications
MIT License
22 stars 5 forks source link

Minify / compress assets #87

Closed deadlyfingers closed 8 years ago

deadlyfingers commented 8 years ago

So far the gulp-vulcanize task concatenates all app imports into 1 or 2 files. But it would be even nicer to shave off some more file size by adding minify and gzip compression if our target bowsers support it.

deadlyfingers commented 8 years ago

Using 'gulp-uglify' to minify js file with combination of 'gulp-minify-html' and 'gulp-minify-inline' to minify html and inline styles. Example savings:

Finally because we are using Express to serve the files we may also be able to support additional gz compression here.

deadlyfingers commented 8 years ago

note: 'gulp-minify-inline' did not work 100% with Polymer styles so I'm using 'gulp-cheerio' to minify inline styles using RegEx until a better option...