electric-it / minimart

MiniMart RubyGem for Chef cookbook mirroring and storage.
Apache License 2.0
52 stars 20 forks source link

Minify CSS and JS in HTMLGenerator #31

Open tapickell opened 8 years ago

tapickell commented 8 years ago

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

richardardrichard commented 8 years ago

I honestly don't have a good reason why it's not a part of that already...

tapickell commented 8 years ago

Cool, I looked at that and was just like, hmmm.... why aren't we doing that.

tapickell commented 8 years ago

I will work on adding that today.

richardardrichard commented 8 years ago

I think I was trying to avoid adding those things as dependencies... which doesn't really make sense at all.... so :+1: