Grunt - Compress and Include assets with timestamp
I've spent the whole day trying to figure out how to start with Grunt, but
all the documentation I was able to find (on GitHub) specifies options and
nothing else.
I'm searching for a more user-friendly documentation/how-to since I'm new
to Grunt itself.
I'd like to automatize the process of minification of several .css files
and include them inside my template within a placeholder defined as
<!-- styles -->
<!-- /styles -->
and
<!-- js -->
<!-- /js -->
What Grunt should do is:
look inside my css directory
compress files in one "main.css" and "main.js" app
open up the html template (it would be great if it doesn't require a tmp
version, but instead be able to update the same html file) and write there
the final <link> and <script> tags linking to the created file appending a
timestamp (for cache busting)
It seems to me like a common approach, but I'm not able to find anything
ready out there.
I looked at "grunt-contrib-cssmin", "cartero", "grunt-includes",
"grunt-include-replace", "grunt-usemin" and tons of alternatives... but
none seems to integrate all requirements and I'm not able to make them
work togheter to get what I want to.
No comments:
Post a Comment