2015-05-24 17:18:16
JavaScript
, 2015-05-24 17:18:16

Are there nodeJS source minification modules (JS/CSS/*) that work not with files, but with in-memory buffers?

That is, as I understand it, gulp from the inside only works with files at the input / output, and even with synchronous functions of the file system, which is even worse for me, and in one worker process that serves the web server itself, do not use it = (
In general, in search of a module / a solution that works with data not from the file system, but from memory, very roughly speaking:
minify(code, function(err, compiledCode){});
If there is no such thing, then, of course, you will have to use temporary files, but I would like to avoid unnecessary calls to the file system...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Shemsedinov, 2015-05-24
Dmitry Mozgovoy

https://www.npmjs.com/package/uglify-js
https://www.npmjs.com/package/clean-css

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question