Sunday, 15 January 2012

javascript - how to have part of some JS code NOT being minified by minifiers -



javascript - how to have part of some JS code NOT being minified by minifiers -

there many tools out there "compress" more or less javascript files mangling variable names, removing comments, etc...

but how "tell" them not process part of file, file. need "tell" them somehow, rewriting part way, or putting tags in comments, ... not process parts of files.

the easiest ugly solution found set code in string , eval it. if there other solution i'd love know because eval ugly!

update:

please due requirements, not possible answers:

the file have minified it needs done within source code

if using gulp, there module called gulp-tap can utilize grab file, split between type of identifier, minify parts want, , concatenate together. i'm sure grunt or other task runners have similar capabilities

javascript minify uglifyjs

No comments:

Post a Comment