Skip to content

Commit

Permalink
Change build order
Browse files Browse the repository at this point in the history
- Copy resources before building ts code
- Use getConfigs to build root project first
  • Loading branch information
jason0x43 committed Dec 15, 2016
1 parent 8001513 commit 5f2b51c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/intern-dev-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

import { echo } from 'shelljs';
import { join, dirname } from 'path';
import { buildDir, copyAll, exec, getResources, glob } from './common';

glob('**/tsconfig.json').forEach(function (tsconfig) {
echo(`## Compiling ${dirname(tsconfig)}`);
exec(`tsc -p "${tsconfig}"`);
});
import { buildDir, copyAll, exec, getConfigs, getResources } from './common';

// Copy resources first in case some of them are needed for builds
const resources = getResources();

Object.keys(resources).forEach(function (dest) {
copyAll(resources[dest], join(buildDir, dest));
});

getConfigs().forEach(function (tsconfig) {
echo(`## Compiling ${dirname(tsconfig)}`);
exec(`tsc -p "${tsconfig}"`);
});

echo('## Done building');

0 comments on commit 5f2b51c

Please sign in to comment.