forked from microsoft/rushstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.js
More file actions
21 lines (17 loc) · 721 Bytes
/
build.js
File metadata and controls
21 lines (17 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const { FileSystem } = require('@rushstack/node-core-library');
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' });
}
// Clean the old build outputs
console.log(`==> Starting build.js for ${path.basename(process.cwd())}`);
FileSystem.ensureEmptyFolder('dist-dev');
FileSystem.ensureEmptyFolder('dist-prod');
FileSystem.ensureEmptyFolder('lib');
FileSystem.ensureEmptyFolder('temp');
// Run Webpack
executeCommand('node node_modules/webpack-cli/bin/cli');
console.log(`==> Finished build.js for ${path.basename(process.cwd())}`);