-
Notifications
You must be signed in to change notification settings - Fork 35
Accept a Buffer in addition to files in .compile()
#11
Comments
I see. Do you know if closure compiler itself allows compilation of stdin? That'd be required to make something like this work. Everything else would still require a temporary file. |
Would be something like: closureProcess.stdin.write(new Buffer('test')); |
Any update on this? |
Bump, I would also really like to use this inside of a Connect pipeline. It's a shame to have to write content to a temporary file ;( |
+1 We demand that :-) Should I send PR? |
Any update? |
It's possible to use buffer for Closure Compiler. But unfortunatelly not like that:
From my experiments it seems that closure_entry_point option does not work with piped files. Especially, compiler seems to not be able to reorder files as needed. This https://code.google.com/p/closure-compiler/wiki/ManageClosureDependencies simply does not work. So I am almost decided to use https://github.com/vesln/temporary, there is no other way. New gulp-closure-compiler (or another name) will be finished soon. |
I've created a gulp plugin for Closure Compiler using this excellent module.
Gulp works on streams and buffers and not files while this module requires you to supply files. A lot of other Node things does this too.
It would be useful if you could also supply a buffer that is passed to the Closure Compiler stdin.
Like:
The text was updated successfully, but these errors were encountered: