-
-
Save stfcodes/713d0eda2d15e34fd58a4fa4be3bda8f to your computer and use it in GitHub Desktop.
d3 & c3 npm shim to es6 module for Ember
This file contains hidden or 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
| // vendor/shims/c3.js | |
| // generated by `ember generate vendor-shim c3` | |
| (function() { | |
| function vendorModule() { | |
| 'use strict'; | |
| return { | |
| 'default': self['c3'], | |
| __esModule: true, | |
| }; | |
| } | |
| define('c3', [], vendorModule); | |
| })(); |
This file contains hidden or 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
| // vendor/shims/d3.js | |
| // generated by `ember generate vendor-shim d3` | |
| (function() { | |
| function vendorModule() { | |
| 'use strict'; | |
| return { | |
| 'default': self['d3'], | |
| __esModule: true, | |
| }; | |
| } | |
| define('d3', [], vendorModule); | |
| })(); |
This file contains hidden or 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
| /* eslint-env node */ | |
| 'use strict'; | |
| const EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
| module.exports = function(defaults) { | |
| let app = new EmberApp(defaults, { | |
| // Add options here | |
| }); | |
| app.import('node_modules/d3/d3.js'); | |
| app.import('node_modules/d3/d3.css'); | |
| app.import('node_modules/c3/c3.js'); | |
| app.import('node_modules/c3/c3.css'); | |
| app.import('vendor/shims/d3.js'); | |
| app.import('vendor/shims/c3.js'); | |
| return app.toTree(); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment