https://github.com/Anthonyzou/simple-compress.git
Light : Smaller than gulp
Compression : Can be configured for gzip or Brotli (node 11+)
Watching : Can be configured to watch directories
Install copy-plus using yarn:
yarn add --dev copy-plus
Configure your package.json
{
"cppConfig": {
"watch": [
{
"dirs": ["src/**", "test/**"],
"ignore": "!**/*.ts",
"dest": "dist",
"keepPath": true,
"ignoreWatchDir": true
}
],
"copy": [
{
"dirs": ["node_modules/muicss/dist/email/*.css"],
"gz": true,
"br": true,
"dest": "dist/src/services/templates",
"keepPath": false
}
]
}
}
keepPath: Ignores source directory structure when falsegz: Prodce a DEST.gz filebr: Prodce a DEST.br file - only available on node 11.7+dirs: Glob patterns to watch directories todest: directory to place items inignoreWatchDir: Don't use the root directory in output file structuredir:["src/**"] => a/b/c.txt and would not give src/a/b/c.txtnfc
Usage: index [options]
Options:
-w, --watch Watch items in the watch configuration
-h, --help output usage information
watch config will be copied at least once.copy will only be copied once per run.nfc -wcopy-plus is MIT licensed.