GitXplorerGitXplorer
R

babel-plugin-uglify

public
47 stars
5 forks
2 issues

Commits

List of commits on branch master.
Unverified
129cc6b5d2076319be7bc9b1b819cd76183388fa

Merge pull request #4 from thealjey/patch-1

RRReverser committed 9 years ago
Unverified
f0defaf0698c992d8ad70f73f8e45b93dfc351fe

Return a plain object to support Babel 6

tthealjey committed 9 years ago
Unverified
67ab2f46a5c80075799844a862e56143c6c6e8b9

Micro-optimize location fixer a little bit.

RRReverser committed 9 years ago
Unverified
5693521560c1a77a551a3dc0e8db2a26e09db30d

Add proper keywords.

RRReverser committed 9 years ago
Unverified
b795f44eed07e288da09188ae3a300360fefc53a

Working version.

RRReverser committed 9 years ago
Unverified
04e55e20198c96fe09ebb187f0f6d09a013bb29a

Initial commit

RRReverser committed 9 years ago

README

The README file for this repository.

babel-plugin-uglify

UglifyJS integration for Babel.

It will allow you to integrate UglifyJS minifier into Babel pipeline without a need for generating code from Babel and parsing back into UglifyJS just to minify it and generate back again.

You can find a bit more detailed article on this in my blog.

Installation

$ npm install babel-plugin-uglify --save-dev

Usage

Note that plugin should be always runned after any ES6 transformers (use :after suffix as shown below), as UglifyJS doesn't understand ES6 at all, and thus will just break if you have anything left untransformed.

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["uglify:after"]
}

Via CLI

$ babel --plugins uglify:after script.js

Via Node API

require('babel').transform('code', {
  plugins: ['uglify:after']
});