Skip to content

Commit

Permalink
skip tsc run if there are no packages to compile
Browse files Browse the repository at this point in the history
Will revert this when we actually have some
  • Loading branch information
SimenB committed Feb 5, 2019
1 parent 72f19e5 commit 7b08165
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ function compileTypes(packages) {
fs.existsSync(path.resolve(p, 'tsconfig.json'))
);

execa.sync('tsc', ['-b', ...packageWithTs]);
if (packageWithTs.length > 0) {
execa.sync('tsc', ['-b', ...packageWithTs]);
}
}

if (files.length) {
Expand Down
4 changes: 3 additions & 1 deletion scripts/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ const packageWithTs = packages.filter(p =>
fs.existsSync(path.resolve(p, 'tsconfig.json'))
);

execa('tsc', ['-b', ...packageWithTs, '--watch']);
if (packageWithTs.length > 0) {
execa('tsc', ['-b', ...packageWithTs, '--watch']);
}

setInterval(() => {
const files = Array.from(filesToBuild.keys());
Expand Down

0 comments on commit 7b08165

Please sign in to comment.