I am looking for a tool to optimize my build on the site. I use SASS as CSS preprocessor and Uglify to create my JavaScript files and some more Grunt related tools. In addition, the markup in this case is a single index.html file, but in other projects it is either in PHP files or in Liquid templates.
I use BEM ( block, element, modifier ) to name my classes, and sometimes, which leads to quite huge classnames like navigation__item__link--home or even longer.
I am looking for a tool that automatically converts final, constructed CSS files in such a way that it changes the names of classes or identifiers to something like .a, .b , but changes every HTML and JavaScript file in the same way, so that the correlated codes do not will be confused.
Of course, I want to save the source files of the project, so I would like the tool to be able to create new files in accordance with these rules and, preferably, be able to use it with Grunt .
optimization javascript html css php
pentzzsolt
source share