-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.ts
40 lines (33 loc) · 1.09 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
import * as shell from 'gulp-shell'
import * as del from 'del'
import { series } from 'gulp'
export async function antlr4ts (): Promise<void> {
await shell.task([
'antlr4ts -visitor grammars/fact/EdiFactLexer.g4 grammars/fact/EdiFactParser.g4 -o packages/fact/src',
'antlr4ts -visitor grammars/x12/EdiX12Lexer.g4 grammars/x12/EdiX12Parser.g4 -o packages/x12/src',
'antlr4ts -visitor grammars/query/ElementSelector.g4 -o packages/dom/query'
])()
}
export async function cleanup (): Promise<void> {
await del([
'**/*.d.ts',
'**/*.js',
'**/*.js.map'
], {
ignore: ['**/node_modules/**']
})
}
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, antlr4ts, mocha)
export const coverage = series(cleanup, antlr4ts, nyc)
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')()
}