Skip to content

Commit

Permalink
fix(cli): using globs with $1 output
Browse files Browse the repository at this point in the history
* temporary workaround to fix $1 in output
eg. --input 'source/**/*.js' --output 'source/$1.min.js'
  • Loading branch information
srod committed Jun 24, 2020
1 parent 83b5cd2 commit 6beb595
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/cli/src/compress.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ const compress = options => {
return new Promise((resolve, reject) => {
minify(options)
.then(() => {
if (options.output.includes('$1')) {
// TODO handle $1 output
// npx node-minify --compressor uglify-js --input 'source/**/*.js' --output 'source/$1.min.js' --option '{"warnings": true, "mangle": false}'
return resolve({
compressorLabel: options.compressorLabel,
compressor: options.compressor,
size: 0,
sizeGzip: 0
});
}
utils
.getFilesizeGzippedInBytes(options.output)
.then(sizeGzip => {
Expand Down

0 comments on commit 6beb595

Please sign in to comment.