node-obfuscator
node-obfuscator copied to clipboard
Request for an option to output the concatenated source so uglifyjs warning can be taken care of more easily
Not a high priority but a nicety to have an option to output the concatenated source so uglifyjs warning can be taken care of more easily, say, in utils.js,
exports.uglify = function (js, opts, cb) {
...
return cb(null, stream.toString(), js);
...
}
with the source output, the line number from the uglifyjs warning can be easily found:
WARN: Non-strict equality against boolean: != true [null:3470,6]
BTW, obfuscator is a great tool!
I took a quick look at the source, and this is already possible, as such:
var options = {}; // build options as per documentation
var obfuscator = require('obfuscator').obfuscator;
var concatenate = obfuscator.concatenate;
concatenate(options, function(err, concatenated) {
if (err) { throw err; }
fs.writeFileSync('concatenated.js', concatenated);
// or, you know, do whatever you like
});
That's cool - thanks!