srod/node-minify

Wildcard for minifying.

Andrewyg opened this issue · 4 comments

So according to the example:

compressor.minify({
  compressor: 'uglifyjs',
  input: './**/*.js',
  output: 'bar.js',
  callback: function(err, min) {}
});

You can only specify wildcard in input, I want to ask is it possible to also specify wildcard in output, so something like:

compressor.minify({
  compressor: 'uglifyjs',
  input: './*.js',
  output: './$1.min.js',
  callback: function(err, min) {}
});

Which the $1 will be replace by the wildcard of the * in input.

srod commented

If I understand well, if you have 5 files in your folder: file1.js, file2.js, file3.js, file4.js, file5.js
You want an output like: file1file2file3file4file5.min.js?

Great! That's what I'm asking for.

Thanks a lot!