https://github.com/nexssp/min
Just FAST, parallel safely compress/minimize files from ./src to ./dist individualy.
https://github.com/nexssp/min
compress easy easy-to-use fast minimize
Last synced: 10 months ago
JSON representation
Just FAST, parallel safely compress/minimize files from ./src to ./dist individualy.
- Host: GitHub
- URL: https://github.com/nexssp/min
- Owner: nexssp
- License: mit
- Created: 2021-05-01T16:40:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-01T18:52:17.000Z (over 4 years ago)
- Last Synced: 2025-02-28T15:28:32.195Z (11 months ago)
- Topics: compress, easy, easy-to-use, fast, minimize
- Language: JavaScript
- Homepage:
- Size: 223 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# @nexssp/min
## Installation
```sh
npm i @nexssp/min -D # install for devDependencies
```
Just **FAST** minify/compress src to dist folder by one command.

## CLI or package.json
```sh
npx @nexssp/min # it will just compress js files from ./src/ to ./dist/
npx @nexssp/min ./source/ ./destination/ # change source and destination
```
## API Example
```js
const { compress } = require("@nexssp/min");
(async () => {
const result = await compress(from, to, { glob });
result.forEach((r) =>
ok(
`${bold(yellow(r.file))} ${r.length} => ${r.compressed.length} ${bold(
"(" + r.compressed.percentage + "%)"
)}`
)
);
})();
```