Last active
August 29, 2015 14:03
-
-
Save jakecraige/192eba9318f0098cb013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Utils from './utils'; | |
export default () => { | |
console.log(Utils.add(1, 2)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default (a, b) => { | |
return a + b; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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