Minify an Entire Directory While Keeping Element/Style/Script Relationships?
Posted
by Jonathan Sampson
on Stack Overflow
See other posts from Stack Overflow
or by Jonathan Sampson
Published on 2009-02-06T21:43:31Z
Indexed on
2010/05/01
19:57 UTC
Read the original article
Hit count: 287
Do any solutions currnetly exist that can minify an entire project directory? More importantly, do any solutions exist that can shorten classnames, id's, and keep them consistent throughout all documents?
Something that can turn this:
Index.html ---
<div class="fooBar">
<!-- Code -->
</div>
Styles.css ---
.fooBar {
// Comments and Messages
background-color:#000000;
}
Index.js ---
$(".fooBar").click(function(){
/* More Comments */
alert("fooBar");
});
Into This:
Index.html ---
<div class="a"></div>
Styles.css ---
.a{background-color:#000;}
Index.js ---
$(".a").click(function(){alert("fooBar");});
© Stack Overflow or respective owner