Comparing version 1.0.1 to 1.0.2
@@ -9,2 +9,8 @@ All notable changes to this project will be documented in this file. | ||
## [1.0.2] - 2021-07-09 | ||
### Changed | ||
- README | ||
### Dev | ||
- tslib upgrade, some dev deps upgrades | ||
## [1.0.1] - 2021-04-29 | ||
@@ -11,0 +17,0 @@ ### Fixed |
@@ -1,1 +0,1 @@ | ||
{"type":"commonjs"} | ||
{"type": "commonjs"} |
{ | ||
"name": "brotli-cli", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"repository": "git@github.com:dzek69/brotli-cli.git", | ||
@@ -9,3 +9,3 @@ "author": "Jacek Nowacki", | ||
"test": "NODE_ENV=test jest", | ||
"docs": "typedoc src/index.ts --out docs --listInvalidSymbolLinks --includes tutorials", | ||
"docs": "typedoc src/index.ts --out docs --listInvalidSymbolLinks --includes tutorials --theme pages-plugin --includeVersion", | ||
"compile": "yarn compile:cjs", | ||
@@ -17,3 +17,3 @@ "compile:cjs": "rm -rf dist && tsc --project tsconfig.cjs.json && node ./build-scripts/compile.cjs.after.mjs", | ||
"prepack": "yarn compile", | ||
"prepublishOnly": "yarn lint && yarn test && yarn docs", | ||
"prepublishOnly": "yarn audit && yarn lint && yarn test && yarn docs", | ||
"start:dev": "nodemon", | ||
@@ -35,3 +35,3 @@ "start:dev:compatibility": "TS_NODE_FILES=true yarn start:dev" | ||
"@dzek69/eslint-config-base": "^2.0.0", | ||
"@dzek69/eslint-config-typescript": "^0.2.4", | ||
"@dzek69/eslint-config-typescript": "^0.4.0", | ||
"@types/brotli": "^1.3.0", | ||
@@ -43,8 +43,11 @@ "@typescript-eslint/eslint-plugin": "^4.11.1", | ||
"husky": "^4.3.0", | ||
"jest": "^26.6.3", | ||
"jest": "^27.0.6", | ||
"must": "^0.13.4", | ||
"nodemon": "^2.0.6", | ||
"ts-node": "^9.0.0", | ||
"typedoc": "^0.20.35", | ||
"typescript": "^4.2.4" | ||
"typedoc": "^0.21.2", | ||
"typescript": "^4.2.4", | ||
"babel-plugin-module-extension": "^0.1.3", | ||
"@types/jest": "^26.0.23", | ||
"typedoc-plugin-pages-fork-fork": "^0.0.3" | ||
}, | ||
@@ -57,6 +60,7 @@ "husky": { | ||
"libraryTemplate": { | ||
"version": "3.0.2", | ||
"version": "3.3.1", | ||
"language": "typescript", | ||
"fixDefaultForCommonJS": true | ||
"fixDefaultForCommonJS": true, | ||
"jsx": false | ||
} | ||
} | ||
} |
@@ -14,23 +14,41 @@ # brotli-cli | ||
1. `brotli-cli compress file1.txt file2.svg file3.js` | ||
1. (see Detailed Usage for glob support) | ||
Files will be created in the same directory, but with `.br` extension appended. Overwriting will occur without asking. | ||
### Local install / no install | ||
> You need npm 5.2+ for this | ||
Run | ||
1. `brotli-cli help` for help and more examples. | ||
1. `npm i brotli-cli` | ||
1. `npx brotli-cli compress file1.txt file2.svg file3.js` | ||
1. (see Detailed Usage for glob support) | ||
### Local install | ||
Files will be created in the same directory, but with `.br` extension appended. Overwriting will occur without asking. | ||
You need npm 5.2+ for this: | ||
## Detailed usage | ||
1. `npm i brotli-cli` | ||
1. `npx brotli-cli file1.txt file2.svg file3.js` | ||
``` | ||
Commands: | ||
brotli-cli compress Compresses specified files | ||
### Run without installing | ||
Options: | ||
--help Show help [boolean] | ||
--version Show version number [boolean] | ||
-m, --mode Brotli compression mode [generic, text, font] [default: "generic"] | ||
-q, --quality Brotli compression quality [0-11] [default: 11] | ||
-l, --lgwin Brotli compression window size [0, 10-24] [default: 0] | ||
-b, --bail Stop execution on first error [boolean] [default: true] | ||
--add-extension, --br Add .br extension to compressed files [boolean] [default: true] | ||
-g, --glob Use glob pattern when matching files [boolean] [default: false] | ||
--glob-skip-br-extension, --skip-br Always skip .br extension when matching files [boolean] [default: true] | ||
-v, --verbose Run with verbose logging [boolean] [default: false] | ||
You need npm 5.2+ for this: | ||
Examples: | ||
brotli-cli compress -q 5 image.jpg Compress `image.jpg` file with generic compression level 5 and save to image.jpg.br | ||
brotli-cli compress -q 5 -br false image.jpg Compress `image.jpg` file and overwrite it | ||
brotli-cli compress -mode text index.html - Compress `index.html` file with text mode max compression (level 11) and print to stdout | ||
brotli-cli compress --glob "images/*.jpg Compress all jpg files from `images` directory, stop on first error. | ||
brotli-cli compress --glob --bail false "images/*.jpg" Compress all jpg files from `images` directory, do not stop on first error (will still print errors to std err and exit with error code). | ||
``` | ||
1. `npx brotli-cli file1.txt file2.svg file3.js` | ||
## License | ||
MIT |
@@ -188,2 +188,3 @@ #!/usr/bin/env node | ||
} | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
if (compressed == null) { | ||
@@ -261,3 +262,2 @@ throw new TypeError("Empty response returned from brotli"); | ||
}) | ||
// @ts-expect-error Missing TS type | ||
.strictOptions(true) | ||
@@ -264,0 +264,0 @@ .argv; // yargs needs that unused expression |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23
54
210913
20
3046
1