1.2.1 • Published 8 years ago

gulp-lzmajs v1.2.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

gulp-lzmajs

npm.io npm.io License

Minify JavaScript with LZMA-JS.

Installation

Install package with NPM and add it to your development dependencies:

npm install --save-dev gulp-lzmajs

Usage

var gulp   = require('gulp'),
    concat = require('gulp-concat'),
    uglify = require('gulp-uglify'),
    lzmajs = require('gulp-lzmajs');

gulp.task('compress', function() {
  return gulp.src('lib/*.js')
             .pipe(concat('all.min.js'))
             .pipe(uglify())
             .pipe(lzmajs(9))
             .pipe(gulp.dest('dist'));
});

Errors

gulp-lzmajs emits an 'error' event if it is unable to minify a specific file. Wherever popssible, the PluginError object will contain the following properties:

  • fileName
  • lineNumber
  • message

To handle errors across your entire pipeline, see the gulp documentation.

Example

hprose-html5