forked from VCityTeam/UD-Viz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
46 lines (44 loc) · 1.33 KB
/
test.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const exec = require('child-process-promise').exec;
const Test = require('@ud-viz/node').Test;
const printExec = function (result) {
console.log('stdout: \n', result.stdout);
console.error('stderr: \n', result.stderr);
};
console.log('Build @ud-viz/shared');
exec('npm run build-shared')
.catch((error) => {
console.log('@ud-viz/shared build failed');
console.error(error);
process.exit(1); //
})
.then(printExec)
.then(() => {
console.log('Build @ud-viz/browser');
exec('npm run build-browser')
.catch((error) => {
console.log('@ud-viz/browser build failed');
console.error(error);
process.exit(1);
})
.then(printExec)
.then(() => {
console.log('Build @ud-viz/node');
exec('npm run build-node')
.catch((error) => {
console.log('@ud-viz/node build failed');
console.error(error);
process.exit(1);
})
.then(printExec)
.then(() => {
Test.scripts('./packages/shared/bin/Test').then(() => {
Test.browserScripts(
'./packages/browser/bin/Test',
'./packages/browser/dist/release/bundle.js'
).then(() => {
Test.html('./packages/browser/examples');
});
});
});
});
});