babel-preset-extplug
Babel preset for ExtPlug plugins.
Last updated 3 years ago by goto-bus-stop .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-preset-extplug 
SYNC missed versions from official npm registry.

babel-preset-extplug

Babel preset for ExtPlug and plugins.

This includes ES2015 and some proposal plugins, targeting AMD or CommonJS modules.

Install

$ npm install --save-dev babel-preset-extplug

Usage

In your .babelrc:

{
  "presets": [
    ["extplug", { "amd": true|false }]
  ]
}

Because the preset can target AMD modules for plugins, it doesn't play nice with a gulpfile.babel.js. This means that you can't put it in your .babelrc if you also want to use ES-future in your gulpfile. Instead, put a config that works for gulp in your .babelrc, and pass babel-preset-extplug to Babel manually when you compile your plugin.

// .babelrc
{
  "presets": [
    ["extplug", { "amd": false }]
  ]
}
// gulpfile.babel.js
gulp.src(myPluginSources)
  .pipe(babel({
    babelrc: false,
    presets: [
      ['extplug', { amd: true }]
    ]
  }))
  .pipe(gulp.dest(builtPluginDirectory))

License

MIT

Current Tags

  • 4.0.2                                ...           latest (3 years ago)

7 Versions

  • 4.0.2                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.0                                ...           3 years ago
  • 3.0.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 7
Last Day 1
Last Week 3
Last Month 15
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |