Skip closing compiler file

I have a shell script that collects all .js files on a page and combines them for compilation using a close compiler. However, I do not want a particular js file to optimize any of the compilers. For example, I have a command to compile files file.js, fileB.js and fileC.js. How can I refuse to skip fileB.js but put it in scripts.min.js output file in the correct order? This way, file.A.js and fileC.js will be optimized using SIMPLE_OPTIMIZATION, and fileB.js will not be affected. Is there a keyword that I can post in the comments of the file itself that says skip this file?

java -jar compiler.jar --js=fileA.js --js=fileB.js --js=fileC.js --js_output_file=scripts.min.js

Thank!

+3
source share
2 answers

If I understand your intention here, you can consider processing each file that you want to minimize separately, and then perform concatenation as a separate step. In pseudo code:

minify fileA.js
minify fileC.js
cat fileA.js fileB.js fileC.js >scripts.min.js
+2
source

, , " ". nullptr . . , - -, . , nullptr . , ( ) .

+1

Source: https://habr.com/ru/post/1784893/


All Articles