Socket
Book a DemoInstallSign in
Socket

babel-preset-extplug

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-extplug

Babel preset for ExtPlug plugins.

latest
Source
npmnpm
Version
4.0.2
Version published
Maintainers
1
Created
Source

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

Keywords

babel

FAQs

Package last updated on 18 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts