glov-build-babel

1.0.4 • Public • Published

Babel task processor for glov-build

Installation requires also installing @babel/core and related modules.

npm install --save-dev glov-build-babel @babel/core @babel/preset-env

API usage:

const babel = require('glov-build-babel');

gb.task({
  name: ...,
  input: ...,
  ...babel(options),
});

Options

  • babel - optional options object to pass to babel
  • sourcemap - optional options object to pass to glov-build-sourcemap

Example usage:

const babel = require('glov-build-babel');

gb.task({
  name: 'client_js_babel_files',
  input: ['client/**/*.js','common/**/*.js'],
  target: 'dev',
  ...babel({
    sourcemap: {
      inline: true,
    },
    babel: {
      babelrc: false,
      presets: [['@babel/env', {
        targets: {
          ie: '10'
        },
        loose: true,
      }]],
      plugins: [
        ['some-babel-plugin', {}],
      ]
    }
  })
});

Package Sidebar

Install

npm i glov-build-babel

Weekly Downloads

8

Version

1.0.4

License

MIT

Unpacked Size

3.35 kB

Total Files

3

Last publish

Collaborators

  • jimbly