Skip to content

Instantly share code, notes, and snippets.

@jakecraige
Last active August 29, 2015 14:03
Show Gist options
  • Save jakecraige/192eba9318f0098cb013 to your computer and use it in GitHub Desktop.
Save jakecraige/192eba9318f0098cb013 to your computer and use it in GitHub Desktop.
var dist = require('broccoli-dist-es6-module');
var esNext = require('broccoli-esnext');
var tree = esNext('lib');
module.exports = dist(tree, {
// the entry script, and module that becomes the global
main: 'main',
// will become window.ic.ajax with the exports from `main`
global: 'mylib',
// the prefix for named-amd modules
packageName: 'mylib',
// global output only: naive shimming, when the id 'ember' is imported,
// substitute with `window.Ember` instead
shim: {
'ember': 'Ember'
}
});
import Utils from './utils';
export default () => {
console.log(Utils.add(1, 2));
}
export default (a, b) => {
return a + b;
}
{
"name": "compile",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"broccoli": "^0.12.3",
"broccoli-dist-es6-module": "^0.2.0",
"broccoli-esnext": "^0.2.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment