Closed dmethvin closed 12 years ago
Share the love with jQuery UI and jQuery Mobile too :-)
Grunt plugin?
As long as the grunt plugin doesn't involve opening the file with node and reading it char by char, I'm good with it.
Potential implementation:
content = fs.readFileSync( filePath, "utf8" );
isBad = content.length !== Buffer.byteLength( content, "utf8" );
I put together some code based on that, which is fortunate because it helped find a bug. This could be turned into a grunt task during the Summit: https://github.com/jquery/jquery/commit/1450305402ee8f36825fd5fa44df913a3be2f4c8
Out of curiosity, should we request uglifyjs add a flag to use/allow escapes in output instead of utf8?
It was already there, I just didn't see it.
See also http://bugs.jquery.com/ticket/12725
Final code is in https://github.com/jquery/jquery/blob/995f816cf4e0a404075c27e0d249db0b4a07a97e/grunt.js#L404 perhaps the whole task could be converted to a plugin?
Yes please! @rwldrn wanna publish more npm modules?
I fixed #12690 for 1.8.3 but there's nothing in place to prevent a regression. Seems like it should be doable with the appropriate grep options in a grunt build step.