Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jadiagaurang committed May 9, 2022
2 parents d216a7b + a797199 commit 4fb3c96
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
42 changes: 26 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,45 @@ minify-all-cli -s [source folder] -d [destination folder] [options]
Usage: -s <source> -d <destination>

Options:
--help Show help [boolean]
--version Show version number [boolean]
-j, --skipJS Should minify JS the file or skip it? [boolean]
-c, --skipCSS Should minify CSS the file or skip it? [boolean]
-h, --skipHTML Should minify HTML the file or skip it? [boolean]
-g, --doGzip Should gzip the file or skip it? [boolean]
-m, --skipFileMasks Partial Filder Path to skip it over [string]
--help Show help [boolean]
--version Show version number [boolean]
-j, --skipJS Should minify JavaScript the file or skip it? [boolean]
-c, --skipCSS Should minify CSS the file or skip it? [boolean]
-h, --skipHTML Should minify HTML the file or skip it? [boolean]
-g, --doGzip Should gzip the file or skip it? [boolean]
-x, --jsCompressor Which JavaScript mangler/compressor to use for
minification? Default: uglifyjs [string]
-m, --skipFileMasks Partial Filder Path to skip minification [array]
-e, --skipFileExtensions File Extensions to skip it over [array]
-i, --ignoreFileMasks Partial Filder Path to ignore it over [string]
-f, --configFile Specifies a json configuration file for the
UglifyJS, CSSNano and HTML Minifier module [string]
-l, --logLevel Set log level to print warn, log, error,
fatal messages [string]
-p, --processCount Specifies process count to set maximum degree
of parallelism [number]
-i, --ignoreFileMasks Partial Filder Path to ignore minification and
copy to destination [array]
-f, --configFile Specifies a json configuration file for the
UglifyJS/terser, CSSNano and HTML Minifier
module [string]
-l, --logLevel Set log level to print warn, log, error, fatal
messages [string]
-p, --processCount Specifies process count to set maximum degree
of parallelism [number]
```

## CLI Example

### Prod

```bash
npx minify-all-cli -s "/home/ubuntu/source" -d "/home/ubuntu/compressed" --skipFileExtensions=.mp3 --skipFileExtensions=.mp4 --logLevel=warn
npx minify-all-cli \
-s "/home/ubuntu/source" -d "/home/ubuntu/compressed" \
--skipFileExtensions=.mp3 --skipFileExtensions=.mp4 \
--logLevel=warn
```

### Local

```bash
node . -s "/home/ubuntu/source" -d "/home/ubuntu/compressed" --skipFileExtensions=.mp3 --skipFileExtensions=.mp4 --logLevel=info
node . \
-s "./tests/asserts" -d "./tests/asserts_compressed" \
--skipFileExtensions=.mp3 --skipFileExtensions=.mp4 \
--logLevel=info
```

## License
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minify-all-cli",
"version": "1.0.12",
"version": "1.0.13",
"description": "Minify All JS, CSS and HTML files in a folder by using UglifyJS, CSSNano and HTMLMinifier with an option to gzip all the files as well.",
"main": "bin/minify-all-cli.js",
"bin": {
Expand Down

0 comments on commit 4fb3c96

Please sign in to comment.