@erwinstone/jsmin
v1.0.2
Published
Fast js minifier
Downloads
41
Maintainers
Readme
jsmin
Fast js minifier
Features
- CLI
- JavaScript API
- Support recursive
- Create ".min.js" file automatically
- Support watch mode
Installation
Install jsmin with npm
npm install @erwinstone/jsmin -g
Usage/Examples
cli:
jsmin dist/js
jsmin dist/js --watch
javascript api:
npm install @erwinstone/jsmin
import { jsmin, jsminRaw } from '@erwinstone/jsmin'
await jsmin({
path: 'dist/js',
})
// or
await jsmin({
path: 'dist/js',
watch: true,
})
// or
await jsminRaw(`
function hello() {
console.log("Hello world");
}
`)