-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.ts
47 lines (38 loc) · 1.14 KB
/
gulpfile.ts
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
import { readdirSync } from 'fs'
import { join } from 'path'
import * as del from 'del'
import * as shell from 'gulp-shell'
import { series } from 'gulp'
export async function cleanup (): Promise<void> {
await del([
'packages/**/*.d.ts',
'packages/**/*.js',
'packages/**/*.js.map'
], {
ignore: ['**/node_modules/**', 'packages/**/types/**']
})
}
export async function lint (): Promise<void> {
await shell.task('ts-standard --report codeframe')()
}
export async function fix (): Promise<void> {
await shell.task('ts-standard --fix --report codeframe')()
}
export async function compile (): Promise<void> {
const packages = readdirSync('packages')
for (const dir of packages) {
await shell.task('tsc', { cwd: join('packages', dir) })()
}
}
export async function mocha (): Promise<void> {
await shell.task('mocha')()
}
export async function nyc (): Promise<void> {
await shell.task('nyc mocha')()
}
export const test = series(cleanup, mocha)
export const coverage = series(cleanup, nyc)
export async function typedoc (): Promise<void> {
await shell.task('typedoc')()
}
export const postpack = series(cleanup, typedoc)