-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtasks.js
27 lines (24 loc) · 952 Bytes
/
tasks.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
export async function clean() {
await shell('shx rm -rf public')
await shell('shx rm -rf node_modules')
}
export async function start() {
await shell('tsc-bundle src/tsconfig.json --outFile public/bin/index.js')
await Promise.all([
shell('tsc-bundle ./src/tsconfig.json --outFile public/bin/index.js --watch > /dev/null'),
shell('smoke-run public/bin -- node public/bin/index.js')
])
}
export async function test() {
await shell('tsc-bundle ./spec/tsconfig.json --outFile ./public/spec/index.js')
await shell('mocha public/spec/index.js')
}
export async function pack() {
await shell('shx rm -rf ./public/pack')
await shell('shx mkdir -p ./public/pack')
await shell('tsc --project ./src/tsconfig.json --outDir ./public/pack')
await shell('shx cp package.json public/pack')
await shell('shx cp readme.md public/pack')
await shell('shx cp license public/pack')
await shell('cd public/pack && npm pack')
}