1.0.1 • Published 5 years ago

gulp-uglify-cli v1.0.1

Weekly downloads
24
License
MIT
Repository
github
Last release
5 years ago

gulp-uglify-cli NPM version

Minify javascript by UglifyJs2 with command line options for gulp.

Installation

npm i -g uglify-js
npm i --save-dev gulp-uglify-cli

Usage

var uglify = require('gulp-uglify-cli')

gulp.task('minifyjs', function(){
  return gulp.src('index.js')
    .pipe(uglify())
    .pipe(gulp.dest('dist'))
})

Options

You can use all command line options in UglifyJs2.

  • String command line option

    	`uglify('-c -m --screw-ie8')`
  • Array command line option

    	`uglify(['-c', '-m', '--screw-ie8'])`
  • Hash option

    	`uglify({preCommand: 'license.js', command: '-c -m --screw-ie8'})`
    
    	By setting `output` option, you can output file directly.
    
    	`uglify({command: '-c', output: '/home/test/output.js'})`
    
    	By setting `uglifyjs` option, you can use custom uglifyjs path.
    
    	`uglify({command: '-c', uglifyjs: '/home/node_modules/.bin/uglifyjs'})`	
    
    	If you have an error 'Permission Denied' in 'gulp-uglify-cli', please try to use `tmp` option which is accessible file path.
    
    	`uglify({command: '-c', tmp: '/tmp/_tmp.js'})`
1.0.1

5 years ago

1.0.0

6 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago