There are many tools out there to "compress" more or less javascript files by mangling variable names, removing comments, etc...
But how to "tell" them to NOT process a part of a file, from this file. I need to "tell" them somehow, by even rewriting that part another way, or putting some tags in comments, ... to NOT process some parts of my files.
The easiest but very ugly solution I found was to put my code in a string and eval it. But if there is any other solution I'd love to know it because eval is UGLY!
UPDATE:
please due to my requirements, those are not possible answers:
- the file HAVE to be minified
- it needs to be done FROM WITHIN the source code
if you are using gulp, there is a module called gulp-tap that you can use to grab the file, split it between some type of identifier, minify the parts you want, and then concatenate it back together. I'm sure that grunt or other task runners have similar capabilities