forked from nrwl/nx-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-scripts.js
78 lines (76 loc) · 2.3 KB
/
package-scripts.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
const nps = require('nps-utils');
const { join } = require('path');
function affected(affectedCommand) {
return {
'origin-master': `nx affected:${affectedCommand} --base=origin/master --parallel --silent --ci`,
'upstream-master': `nx affected:${affectedCommand} --base=upstream/master --parallel --silent --ci`,
};
}
module.exports = {
scripts: {
clean: 'shx rm -rf dist/',
prepare: {
and: {
e2e: {
up: nps.series.nps('prepare.e2e', 'e2e.up'),
headless: nps.series.nps('prepare.e2e', 'e2e.headless'),
},
package: {
vscode: nps.series.nps(
'clean',
'prepare.vscode.build',
'install-dependencies.vscode',
'package.vscode'
),
},
},
vscode: {
build: nps.series.nps('prepare.vscode.server', 'prepare.vscode.client'),
server: 'ng build vscode-app --prod --noSourceMap',
client: 'ng build vscode-ui --prod',
},
ci: {
vscode: nps.concurrent({
server: 'ng build vscode-app --noSourceMap',
client:
'ng build nx-console --configuration=vscode --noSourceMap --optimization=false --noCommonChunk --aot=false --buildOptimizer=false',
}),
},
dev: {
vscode: nps.concurrent({
server: 'ng build vscode-app --watch',
client: 'ng build vscode-ui --watch',
}),
},
},
package: {
vscode: nps.series(
`shx rm -rf ${join('dist', 'apps', 'vscode', '**', '*-es5.js')}`,
`node ${join('tools', 'scripts', 'vscode-vsce.js')}`
),
},
format: {
default: 'nx format:write --base=upstream/master',
and: {
lint: {
check: nps.concurrent.nps('format.check', 'lint'),
},
},
write: 'nx format:write --base=upstream/master',
check: 'nx format:check --base=upstream/master',
},
storybook: {
default: 'ng run vscode-ui-feature-task-execution-form:storybook',
},
['storybook-e2e']: {
default: 'ng run vscode-ui-feature-task-execution-form-e2e:e2e',
},
test: {
default: 'nx affected:test --all --parallel',
affected: affected('test'),
},
'install-dependencies': {
vscode: `node ${join('tools', 'scripts', 'vscode-yarn.js')}`,
},
},
};