babel-minify
✂️ An ES6+ aware minifier based on the Babel toolchain (beta)
Last updated 2 years ago by babeljs .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-minify 
SYNC missed versions from official npm registry.

babel-minify

Node API and CLI

npm

Use babel-minify if you don't already use babel (as a preset) or want to run it standalone.

Installation

npm install babel-minify --save-dev

Usage

Node API

const minify = require("babel-minify");

const {code, map} = minify("input code", {
  mangle: {
    keepClassName: true
  }
});

CLI

minify input.js --out-file input.min.js --mangle.keepClassName

Node API

const minify = require("babel-minify");

minify(input, minifyOptions, overrides)

minifyOptions

Refer babel-preset-minify options

overrides

  • babel: Custom babel
  • minifyPreset: Custom minify preset
  • inputSourceMap: Input Sourcemap
  • sourceMaps: [Boolean]
  • comments: [Function | RegExp | Boolean]

CLI Options

minify input.js [options]

Simple preset options

For simple options, use --optionName in CLI

Refer preset's 1-1 options for the list of options

Example:

minify input.js --mangle false

Nested preset options

Usage: --optionName.featureName

Example:

minify input.js --mangle.keepClassName --deadcode.keepFnArgs --outFile input.min.js

Refer the corresponding plugins to know the list of options it takes

IO options

  • --out-file path/to/file.min.js: Output filename. Used only when reading from STDIN / a single input file
  • --out-dir path/to/dir: Output Directory.

Current Tags

  • 0.6.0-alpha.9                                ...           canary (8 months ago)
  • 0.5.1                                ...           latest (8 months ago)

96 Versions

  • 0.6.0-alpha.9                                ...           8 months ago
  • 0.5.1                                ...           8 months ago
  • 0.6.0-alpha.8                                ...           8 months ago
  • 0.6.0-alpha.5                                ...           a year ago
  • 0.6.0-alpha.4                                ...           a year ago
  • 0.5.0                                ...           2 years ago
  • 0.5.0-alpha.9                                ...           2 years ago
  • 0.5.0-alpha.3cc09dcf                                ...           2 years ago
  • 0.5.0-alpha.beb87b9a                                ...           2 years ago
  • 0.5.0-alpha.5a128fd5                                ...           2 years ago
  • 0.5.0-alpha.2ed85317                                ...           2 years ago
  • 0.5.0-alpha.a24dd066                                ...           2 years ago
  • 0.5.0-alpha.2e0de171                                ...           2 years ago
  • 0.5.0-alpha.89fc69da                                ...           2 years ago
  • 0.5.0-alpha.a28b6b00                                ...           2 years ago
  • 0.5.0-alpha.2ec8ff72                                ...           2 years ago
  • 0.5.0-alpha.01eac1c3                                ...           2 years ago
  • 0.5.0-alpha.5dbc73f7                                ...           2 years ago
  • 0.5.0-alpha.830ce3f1                                ...           2 years ago
  • 0.5.0-alpha.9e447f6d                                ...           2 years ago
  • 0.5.0-alpha.3b1a8f05                                ...           2 years ago
  • 0.5.0-alpha.367cc048                                ...           2 years ago
  • 0.5.0-alpha.36b27d42                                ...           2 years ago
  • 0.5.0-alpha.7ba5821f                                ...           2 years ago
  • 0.5.0-alpha.1cb46b73                                ...           2 years ago
  • 0.5.0-alpha.85c9b6d8                                ...           2 years ago
  • 0.5.0-alpha.6889f45d                                ...           2 years ago
  • 0.5.0-alpha.91ed3622                                ...           2 years ago
  • 0.4.3                                ...           2 years ago
  • 0.5.0-alpha.b5637c57                                ...           2 years ago
  • 0.4.2                                ...           2 years ago
  • 0.5.0-alpha.540d75e7                                ...           2 years ago
  • 0.5.0-alpha.bce578e2                                ...           2 years ago
  • 0.5.0-alpha.18dcfe13                                ...           2 years ago
  • 0.5.0-alpha.9939bca9                                ...           2 years ago
  • 0.5.0-alpha.5f601890                                ...           2 years ago
  • 0.5.0-alpha.34c3efe9                                ...           2 years ago
  • 0.5.0-alpha.9e986477                                ...           2 years ago
  • 0.5.0-alpha.e86a44f1                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.5.0-alpha.e9f96ffe                                ...           2 years ago
  • 0.5.0-alpha.8b905991                                ...           2 years ago
  • 0.5.0-alpha.b4285271                                ...           2 years ago
  • 0.5.0-alpha.7b176463                                ...           2 years ago
  • 0.5.0-alpha.55276695                                ...           2 years ago
  • 0.5.0-alpha.b5bafaeb                                ...           2 years ago
  • 0.5.0-alpha.72092d20                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.4.0-alpha.caaefb4c                                ...           2 years ago
  • 0.4.0-alpha.f95869d4                                ...           2 years ago
  • 0.4.0-alpha.12994a48                                ...           2 years ago
  • 0.4.0-alpha.4b14df35                                ...           2 years ago
  • 0.4.0-alpha.6546ad11                                ...           2 years ago
  • 0.4.0-alpha.15ca1f11                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.3.0-alpha.4143a25b                                ...           2 years ago
  • 0.3.0-alpha.71b0b884                                ...           2 years ago
  • 0.3.0-alpha.6ceffb8d                                ...           2 years ago
  • 0.3.0-alpha.636ae276                                ...           2 years ago
  • 0.3.0-alpha.ab81368f                                ...           2 years ago
  • 0.3.0-alpha.ac576234                                ...           2 years ago
  • 0.3.0-alpha.879f25ec                                ...           2 years ago
  • 0.3.0-alpha.5ee3078e                                ...           2 years ago
  • 0.3.0-alpha.8857f145                                ...           2 years ago
  • 0.3.0-alpha.169f8743                                ...           2 years ago
  • 0.3.0-alpha.6ae655c0                                ...           2 years ago
  • 0.3.0-alpha.d9c99d3f                                ...           2 years ago
  • 0.3.0-alpha.a351eeed                                ...           2 years ago
  • 0.3.0-alpha.cf9a0da2                                ...           2 years ago
  • 0.3.0-alpha.e6a189cd                                ...           2 years ago
  • 0.3.0-alpha.670b24ec                                ...           2 years ago
  • 0.3.0-alpha.7f4dc3d4                                ...           2 years ago
  • 0.3.0-alpha.033d9ab6                                ...           2 years ago
  • 0.3.0-alpha.37064b40                                ...           2 years ago
  • 0.3.0-alpha.9a74dfd1                                ...           2 years ago
  • 0.3.0-alpha.a7421897                                ...           2 years ago
  • 0.3.0-alpha.da60c6b8                                ...           2 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.12                                ...           4 years ago
  • 0.1.11                                ...           4 years ago
  • 0.1.10                                ...           4 years ago
  • 0.1.9                                ...           4 years ago
  • 0.1.8                                ...           4 years ago
  • 0.1.7                                ...           4 years ago
  • 0.1.6                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.10                                ...           4 years ago
  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
  • 0.0.0                                ...           4 years ago
Downloads
Today 25
This Week 291
This Month 208
Last Day 139
Last Week 354
Last Month 2,820
Dependencies (6)
Dev Dependencies (0)
None
Dependents (109)

Copyright 2014 - 2016 © taobao.org |