Skip to content

Commit

Permalink
Merge pull request #435 from tildeio/publish-interfaces
Browse files Browse the repository at this point in the history
Build @glimmer/interfaces
  • Loading branch information
tomdale authored Mar 23, 2017
2 parents 31c07d3 + 2a9fe0f commit 3ac7c0d
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions build/broccoli/build-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ function topsortPackages() {
// that `package.json`.
let pkgs = glob
.sync(`${PACKAGES_PATH}/**/package.json`)
.map(pkgPath => require(pkgPath))
// .filter(pkg => pkg.name === '@glimmer/util')
.filter(pkg => pkg.name !== '@glimmer/interfaces');
.map(pkgPath => require(pkgPath));

// Get a list of package names discovered in the repo.
let inRepoDependencies = pkgs.map(pkg => pkg.name);
Expand Down Expand Up @@ -77,14 +75,25 @@ function topsortPackages() {
*/
function treeForPackage(packagePath) {
let srcTrees = [
funnel(packagePath, { exclude: ['test/'] }),
funnel(packagePath, { exclude: ['test/**/*'] }),
];

let packageTree = funnel(buildPackage({
srcTrees,
projectPath: packagePath,
tsconfigPath: TSCONFIG_PATH
}), { destDir: 'dist' });
let packageTree;

if (fs.existsSync(path.join(packagePath, 'index.d.ts'))) {
// @glimmer/interfaces only exports types, so we can copy it verbatim without
// any transpilation.
packageTree = funnel(packagePath, {
destDir: path.join('dist', 'types'),
exclude: ['package.json']
});
} else {
packageTree = funnel(buildPackage({
srcTrees,
projectPath: packagePath,
tsconfigPath: TSCONFIG_PATH,
}), { destDir: 'dist' });
}

let packageJSONTree = treeForPackageJSON(packagePath);

Expand Down

0 comments on commit 3ac7c0d

Please sign in to comment.