Does YUI include multiple JS files in the specified order?

If so, what use? I try this:

-jar yuicompressor-2.4.7 file1.js, file2.js -o combined.js

but I get an error to indicate the type parameter.

If I do the same with 1 file, it will be reduced and the contents will be displayed on stdout. I would like to merge file1and file2in that order.

+5
source share
3 answers

If he complains that a type parameter should be specified, you must specify it, for example:

-jar yuicompressor-2.4.7 file1.js, file2.js --type js -o combined.js 
+1
source
+1

, , ( - ). , , @Nick . , YUI Compessor , , . IOW, :

...yui-compressor.jar -o blah.css *.css

:

...yui-compressor.jar -o blah.css 1.css 2.css

, . - . , Windows:

type 1.css 2.css | java -jar yui-compressor.jar --type js -o blah.css

Unix/Linux:

cat 1.css 2.css | java -jar yui-compressor.jar --type js -o blah.css

( , , )

Make sure you cator the typefiles are in the correct order.

0
source

All Articles