Home

Awesome

broccoli-dist-es6-module

Build Status

demo

Author your library in ES6 modules and distribute in everything under the sun:

Installation

$ npm install broccoli-dist-es6-module

Usage: Sample Brocfile.js

var dist = require('broccoli-dist-es6-module');

module.exports = dist('lib', {

  // the entry script, and module that becomes the global
  main: 'main',

  // will become window.ic.ajax with the exports from `main`
  global: 'ic.ajax',

  // the prefix for named-amd modules
  packageName: 'ic-ajax',

  // global output only: naive shimming, when the id 'ember' is imported,
  // substitute with `window.Ember` instead
  shim: {
    'ember': 'Ember'
  }
});

And then run broccoli:

$ broccoli build dist

Open up dist to see the results.

Options

Notes