empty output file
Closed this issue · 5 comments
PierBover commented
Hi
I'm using the 2.0 beta, but the result is always a file with the content [object Object]
.
This is my code:
var compressor = require('node-minify')
compressor.minify({
compressor: 'uglifyjs',
input: './js/**/*.js',
output: './build/build.js',
callback: function(err, min){
console.log("Done!");
}
});
Am I doing something wrong or is this a problem with the beta?
PierBover commented
I've tried with an array in input
instead of the wildcard with the same result.
PierBover commented
In the end I had to manually write the file with fs.writeFile('./build/build.js',min)
.
I was under the assumption the file was written to the output
automatically.
srod commented
Hi,
Yes, the output is written automatically.
I will try with your setup.
srod commented
I have fixed the bug, can you try the new beta ?
You have to install it: npm install node-minify@beta
PierBover commented
Thanks! It works now.