|
2 | 2 |
|
3 | 3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app'); |
4 | 4 |
|
| 5 | +EmberApp.prototype.populateLegacyFiles = function () { |
| 6 | + |
| 7 | + this.import('jquery/jquery.js'); |
| 8 | + this.import('handlebars/handlebars.js'); |
| 9 | + |
| 10 | + if (this.env === 'production') { |
| 11 | + this.import('ember-prod/index.js'); |
| 12 | + } else { |
| 13 | + this.import('ember/index.js'); |
| 14 | + } |
| 15 | + |
| 16 | + this.import('ember-cli-shims/app-shims.js', { |
| 17 | + ember: ['default'] |
| 18 | + }); |
| 19 | + |
| 20 | + this.import('ember-resolver/dist/modules/ember-resolver.js', { |
| 21 | + 'ember/resolver': ['default'] |
| 22 | + }); |
| 23 | + |
| 24 | + this.import('ember-load-initializers/ember-load-initializers.js', { |
| 25 | + 'ember/load-initializers': ['default'] |
| 26 | + }); |
| 27 | +}; |
| 28 | + |
| 29 | + |
5 | 30 | var app = new EmberApp({ |
6 | 31 | name: require('./package.json').name, |
7 | 32 |
|
8 | | - legacyFilesToAppend: [ |
9 | | - 'jquery.js', |
10 | | - 'handlebars.js', |
11 | | - 'ember.js', |
12 | | - 'ic-ajax/dist/named-amd/main.js', |
13 | | - 'ember-data.js', |
14 | | - 'app-shims.js', |
15 | | - 'ember-resolver.js', |
16 | | - 'ember-load-initializers.js' |
17 | | - ], |
18 | | - |
19 | | - // AKA whitelisted modules |
20 | | - ignoredModules: [ |
21 | | - 'ember', |
22 | | - 'ember/resolver', |
23 | | - 'ember/load-initializers', |
24 | | - 'ic-ajax' |
25 | | - ], |
26 | | - |
27 | | - // hack we can hopefully remove as the addon system improves |
28 | | - importWhitelist: { |
29 | | - 'ember': ['default'], |
30 | | - 'ember/resolver': ['default'], |
31 | | - 'ember/load-initializers': ['default'], |
32 | | - 'ic-ajax': ['request'], |
33 | | - }, |
| 33 | + // Use this to instruct the `broccoli-es6-concatenator` to allow |
| 34 | + // references to the following modules (this would commonly include |
| 35 | + // any modules exported from any AMD files added to `legacyFilesToAppend`) |
| 36 | + ignoredModules: [ ], |
| 37 | + |
| 38 | + // Use this to notify the import validator of any AMD modules |
| 39 | + // that you add to your project. |
| 40 | + importWhitelist: { }, |
34 | 41 |
|
35 | 42 | // hack |
36 | 43 | getEnvJSON: require('./config/environment') |
37 | 44 | }); |
38 | 45 |
|
| 46 | +app.import('ember-data/ember-data.js'); |
| 47 | +app.import('ic-ajax/dist/named-amd/main.js', { |
| 48 | + 'ic-ajax': [ |
| 49 | + 'default', |
| 50 | + 'defineFixture', |
| 51 | + 'lookupFixture', |
| 52 | + 'raw', |
| 53 | + 'request', |
| 54 | + ] |
| 55 | +}); |
| 56 | + |
| 57 | + |
39 | 58 | module.exports = app.toTree(); |
0 commit comments