Minify CSS and JS in HTMLGenerator
tapickell opened this issue · 4 comments
Just an idea that could simplify things a bit.
Currently we have rake tasks compile_js
and compile_css
https://github.com/electric-it/minimart/blob/master/Rakefile#L18-L44
That will uglify and minify the JS and CSS files from the _assets dir to the assets dir.
In the HTMLGenerator
class we are copying those assets over into the web directory as part of the static site creation.
https://github.com/electric-it/minimart/blob/master/lib/minimart/web/html_generator.rb#L34
It seems like this may be a good place to have it minify & uglify the CSS and JS files for us during the site generation process instead of relying on the rake task.
What do you think @richardardrichard @ge1st @berniedurfee-ge
I honestly don't have a good reason why it's not a part of that already...
Cool, I looked at that and was just like, hmmm.... why aren't we doing that.
I will work on adding that today.
I think I was trying to avoid adding those things as dependencies... which doesn't really make sense at all.... so 👍