Wildcard for minifying.
Andrewyg opened this issue · 4 comments
Andrewyg commented
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
?
Andrewyg commented
Ummm...nope
I mean something like .htaccess in Apache.
So suppose I have file1.js file2.js, I want the code output file1.min.js
file2.min.js.
On Thu, Sep 13, 2018 at 5:21 PM Rodolphe Stoclin ***@***.***> wrote:
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?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#417 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AT2DYi6EY5VAvugtII-DcMl9uoLCGJlWks5uaiOagaJpZM4WmeHZ>
.
--
Sincerely,
Andrew Young
srod commented
I've released 3.5.0, with documentation: https://node-minify.2clics.net/options.html#using-wildcards-with-1-output
Andrewyg commented
Great! That's what I'm asking for.
Thanks a lot!