forked from microsoft/rushstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
27 lines (21 loc) · 780 Bytes
/
build.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const fsx = require('fs-extra');
const child_process = require('child_process');
const path = require('path');
const process = require('process');
function executeCommand(command) {
console.log('---> ' + command);
child_process.execSync(command, { stdio: 'inherit' });
}
console.log(`==> Starting build.js for ${path.basename(process.cwd())}`);
console.log();
// Clean the old build outputs
fsx.emptyDirSync('dist');
fsx.emptyDirSync('lib');
fsx.emptyDirSync('temp');
fsx.emptyDirSync('etc');
// Run the TypeScript compiler
executeCommand('node node_modules/typescript/lib/tsc');
// Run the scenario runner
require('./lib/runScenarios').runScenarios('./config/build-config.json');
console.log();
console.log(`==> Finished build.js for ${path.basename(process.cwd())}`);