https://github.com/rodeymanager/gulp-jsminer
js miner
https://github.com/rodeymanager/gulp-jsminer
gulp javascript jsminer node
Last synced: 3 months ago
JSON representation
js miner
- Host: GitHub
- URL: https://github.com/rodeymanager/gulp-jsminer
- Owner: RodeyManager
- Created: 2017-04-05T10:40:45.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T17:07:52.000Z (over 3 years ago)
- Last Synced: 2025-05-20T00:15:10.431Z (about 1 year ago)
- Topics: gulp, javascript, jsminer, node
- Language: JavaScript
- Size: 318 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### gulp-jsminer (javascript 压缩)
```javascript
const jsminer = require('gulp-jsminer');
gulp.task('default', () => {
gulp
.src('assets/js/**/*')
.pipe(jsminer({ toplevel: true }))
.pipe(gulp.dest('dist'));
});
```
```javascript
// 转换ES6+后进行压缩
const babel = require('gulp-babel');
const jsminer = require('gulp-jsminer');
gulp.task('default', () => {
gulp
.src('assets/js/**/*')
.pipe(babel())
.pipe(jsminer())
.pipe(gulp.dest('dist'));
});
```
## options
see [terser](https://github.com/terser/terser#command-line-options) options
### Listen
ISC