views:

17

answers:

1

I'm trying to pipe all the content from a PHP generated file to YUI CSS compressor.

// this command works great for Google Closure Javascript Compiler
php jscompressor.php | java -jar compiler.jar --js_output_file compressed.js

php jscompressor.php pulls up a PHP file that has a lot of generated JS.

I was hopping I could do exactly this but with YUI.
I cant.

// can anyone help me on this one? the following code doesnt work
php csscompressor.php | java -jar yuicompressor-2.4.2.jar -type css -o cssyui_compiled.js

Thanks in advance.

+1  A: 

I had a typo on the type. Now works as expected.

// the following command pipes all output from csscompressor
// into YUI for CSS compression
php csscompressor.php | java -jar yuicompressor-2.4.2.jar -o cssyui_compiled.js --type css

Hope it may help someone! ;)

Frankie