ember-cli-uglify
JavaScript minification for Ember-CLI
Last updated 4 months ago by turbo87 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ember-cli-uglify 
SYNC missed versions from official npm registry.

ember-cli-uglify

npm Build Status Build status

UglifyJS for Ember.js.

Installation

ember install ember-cli-uglify

Usage

After installing ember-cli-uglify it will automatically hook into the build pipeline and minify your JS files in production builds.

If you want to customize how ember-cli-uglify is running UglifyJS under the hood you have several configuration options available:

// ember-cli-build.js

var app = new EmberApp({
  'ember-cli-uglify': {
    enabled: true,

    exclude: ['vendor.js'],

    uglify: {
      compress: {
        sequences: 50,
      },
      output: {
        semicolons: true,
      },
    },
  },
});

Options

  • enabled?: boolean: Enables/Disables minification (defaults to true for production builds, false for development builds)

  • exclude?: string[]: A list of paths or globs to exclude from minification

  • uglify?: UglifyOptions: A hash of options that are passed directly to UglifyJS

Source Maps

Source maps are disabled by default for production builds in Ember CLI. If you want to enable source maps for production builds you can configure that in your ember-cli-build.js too:

// ember-cli-build.js

var app = new EmberApp({
  sourcemaps: {
    enabled: true,
    extensions: ['js'],
  },
});

License

ember-cli-uglify is licensed under the MIT License.

Current Tags

  • 3.0.0                                ...           latest (4 months ago)
  • 2.0.0-beta.2                                ...           next (2 years ago)

9 Versions

  • 3.0.0                                ...           4 months ago
  • 2.1.0                                ...           a year ago
  • 2.0.2                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 2.0.0-beta.2                                ...           2 years ago
  • 2.0.0-beta.1                                ...           2 years ago
  • 1.2.0                                ...           4 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago

Copyright 2014 - 2016 © taobao.org |