JavaScript minification for Ember-CLI
JavaScript HTML
Clone or download
Latest commit e5f0b28 Mar 28, 2018
Permalink
Failed to load latest commit information.
config add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
tests add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
.editorconfig add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
.ember-cli add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
.gitignore add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
.npmignore add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
.travis.yml add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
.watchmanconfig add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
CHANGELOG.md Updates broccoli-uglify-sourcemap to version 2.0.1 Jan 23, 2018
CODE_OF_CONDUCT.md fix CODE_OF_CONDUCT.md Feb 20, 2018
LICENSE.md Initial commit of addon Jan 26, 2015
README.md add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
appveyor.yml add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
ember-cli-build.js add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
index.js run uglify in parallel Mar 27, 2018
package.json release v2.1.0 🎉 Mar 28, 2018
testem.js add test (basically, a default app built’s tests run even post uglifi… Feb 20, 2018
yarn.lock run uglify in parallel Mar 27, 2018

README.md

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.