diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 826b096f27..1430afc76b 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -110,6 +110,8 @@ class EmberApp { this._initProject(options); this.name = options.name || this.project.name(); + this._folderName = options.folderName || 'app'; + this.env = EmberApp.env(); this.isProduction = this.env === 'production'; @@ -257,7 +259,7 @@ class EmberApp { let trees = (options && options.trees) || {}; let srcTree = buildTreeFor('src', trees.src); - let appTree = buildTreeFor('app', trees.app); + let appTree = buildTreeFor(this._folderName, trees.app); let testsPath = typeof trees.tests === 'string' ? resolvePathFor('tests', trees.tests) : null; let testsTree = buildTreeFor('tests', trees.tests, options.tests); @@ -267,9 +269,9 @@ class EmberApp { if (isExperimentEnabled('MODULE_UNIFICATION')) { let srcStylesPath = `${resolvePathFor('src', trees.src)}/ui/styles`; - this._stylesPath = fs.existsSync(srcStylesPath) ? srcStylesPath : resolvePathFor('app/styles', trees.styles); + this._stylesPath = fs.existsSync(srcStylesPath) ? srcStylesPath : resolvePathFor(this._folderName + '/styles', trees.styles); } else { - this._stylesPath = resolvePathFor('app/styles', trees.styles); + this._stylesPath = resolvePathFor(this._folderName + '/styles', trees.styles); } let stylesTree = null; @@ -277,7 +279,7 @@ class EmberApp { stylesTree = new UnwatchedDir(this._stylesPath); } - let templatesTree = buildTreeFor('app/templates', trees.templates, false); + let templatesTree = buildTreeFor(this._folderName + '/templates', trees.templates, false); // do not watch bower's default directory by default let bowerTree = buildTreeFor(this.bowerDirectory, null, !!this.project._watchmanInfo.enabled); @@ -394,6 +396,11 @@ class EmberApp { @method _initVendorFiles */ _initVendorFiles() { + + if (this.options.skipVendorFiles) { + return; + } + let bowerDeps = this.project.bowerDependencies(); let ember = this.project.findAddonByName('ember-source'); let addonEmberCliShims = this.project.findAddonByName('ember-cli-shims');