1.0.2 • Published 2 years ago

@erwinstone/jsmin v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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");
	}
`)