Skip to content

Commit

Permalink
Merge branch 'forked/3.10.1' into forked/3.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nulle committed Jan 10, 2020
2 parents fa8cdb1 + 1821f75 commit 2dee4e0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lib/broccoli/ember-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand All @@ -267,17 +269,17 @@ 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;
if (fs.existsSync(this._stylesPath)) {
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);
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 2dee4e0

Please sign in to comment.