EmberApp is the main class Ember CLI uses to manage the Broccoli trees for your application. It is very tightly integrated with Broccoli and has a `toTree()` method you can use to get the entire tree for your application. Available init options: - storeConfigInMeta, defaults to `true`
(defaults, options)
| 61 | @param {Object} [options={}] Configuration options |
| 62 | */ |
| 63 | constructor(defaults, options) { |
| 64 | if (arguments.length === 0) { |
| 65 | options = {}; |
| 66 | } else if (arguments.length === 1) { |
| 67 | options = defaults; |
| 68 | } else { |
| 69 | defaultsDeep(options, defaults); |
| 70 | } |
| 71 | |
| 72 | this._initProject(options); |
| 73 | this.name = options.name || this.project.name(); |
| 74 | |
| 75 | this.env = EmberApp.env(); |
| 76 | this.isProduction = this.env === 'production'; |
| 77 | |
| 78 | this.registry = options.registry || p.defaultRegistry(this); |
| 79 | |
| 80 | this._initTestsAndHinting(options); |
| 81 | this._initOptions(options); |
| 82 | this._initVendorFiles(); |
| 83 | |
| 84 | this._styleOutputFiles = {}; |
| 85 | |
| 86 | // ensure addon.css always gets concated |
| 87 | this._styleOutputFiles[this.options.outputPaths.vendor.css] = []; |
| 88 | |
| 89 | this._scriptOutputFiles = {}; |
| 90 | this._customTransformsMap = new Map(); |
| 91 | |
| 92 | this.otherAssetPaths = []; |
| 93 | this.legacyTestFilesToAppend = []; |
| 94 | this.vendorTestStaticStyles = []; |
| 95 | this._nodeModules = new Map(); |
| 96 | |
| 97 | this.trees = this.options.trees; |
| 98 | |
| 99 | this.populateLegacyFiles(); |
| 100 | this.initializeAddons(); |
| 101 | this.project.addons.forEach((addon) => (addon.app = this)); |
| 102 | p.setupRegistry(this); |
| 103 | this._importAddonTransforms(); |
| 104 | this._notifyAddonIncluded(); |
| 105 | |
| 106 | this._debugTree = BroccoliDebug.buildDebugCallback('ember-app'); |
| 107 | |
| 108 | this._defaultPackager = new DefaultPackager({ |
| 109 | env: this.env, |
| 110 | name: this.name, |
| 111 | autoRun: this.options.autoRun, |
| 112 | project: this.project, |
| 113 | registry: this.registry, |
| 114 | sourcemaps: this.options.sourcemaps, |
| 115 | minifyCSS: this.options.minifyCSS, |
| 116 | areTestsEnabled: this.tests, |
| 117 | styleOutputFiles: this._styleOutputFiles, |
| 118 | scriptOutputFiles: this._scriptOutputFiles, |
| 119 | storeConfigInMeta: this.options.storeConfigInMeta, |
| 120 | customTransformsMap: this._customTransformsMap, |
nothing calls this directly
no test coverage detected