Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Garrett committed Jan 30, 2019
1 parent 0864196 commit 7a3a716
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
23 changes: 6 additions & 17 deletions build/broccoli/build-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ module.exports = function buildPackages(es2017, matrix) {
let es5 = transpileToES5(es2017);
let targets = { es5, es2017 };

// We ignore the `@glimmer/blueprint` tree as it is ember-only, and is picked
// up later on in the build process.
let packages = project.packages
.filter(pkg => pkg.name !== '@glimmer/blueprint')
.map(buildPackage);

packages = flatten(packages);
Expand All @@ -32,24 +35,10 @@ module.exports = function buildPackages(es2017, matrix) {
return packages;

function buildPackage(pkg) {
let pkgName = pkg.name;
let builds;

// The blueprint package is structured differently from other packages, so
// we just copy it over verbatim to the build output.
if (pkgName === '@glimmer/blueprint') {
builds = [funnel(`packages/${pkgName}`, {
destDir: `${pkgName}/`,
exclude: ['**/node_modules/**']
})];
} else {
builds = buildMatrix(pkgName, matrix);
}

return [
writePackageJSON(pkgName),
writeLicense(`${pkgName}/LICENSE`),
...builds
writePackageJSON(pkg.name),
writeLicense(`${pkg.name}/LICENSE`),
...buildMatrix(pkg.name, matrix)
];
}

Expand Down
24 changes: 23 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,31 @@ module.exports = function(_options) {
];
}

// Include any Ember Addon files, without src (Glimmer only) or TS files
let emberTree = funnel('packages/', {
exclude: [
'**/node_modules',
'**/tmp',
'**/types',
'**/dist',
'**/src',
'**/test',
'**/*.ts'
]
});

// Grab the Ember Addon files from the TS build. This ignores dummy app output
// as well, since dummy apps have an `app` directory.
let emberJsTree = funnel(jsTree, {
include: [
'*/*/addon/**',
'*/*/app/**',
]
});

// Third, build our module/ES combinations for each package, and their tests.
let packagesTree = buildPackages(jsTree, matrix);
let testsTree = buildTests(tsTree, jsTree, packagesTree);

return merge([packagesTree, testsTree]);
return merge([packagesTree, testsTree, emberTree, emberJsTree], { overwrite: true });
}

0 comments on commit 7a3a716

Please sign in to comment.