-
Notifications
You must be signed in to change notification settings - Fork 92
/
lib.ts
25 lines (18 loc) · 856 Bytes
/
lib.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
import { task, series, parallel } from 'just-task';
import { cleanTask, tscTask, jestTask, defaultCleanPaths, tslintTask } from '../tasks';
export function lib() {
task('clean', cleanTask([...defaultCleanPaths(), 'lib-commonjs']));
task('ts:commonjs', tscTask({ module: 'commonjs', outDir: 'lib-commonjs' }));
task('ts:esm', tscTask({ module: 'esnext', outDir: 'lib' }));
task('ts:watch', tscTask({ module: 'esnext', outDir: 'lib', watch: true }));
task('ts', parallel('ts:commonjs', 'ts:esm'));
task('jest', jestTask());
task('jest:watch', jestTask({ watch: true }));
task('tslint', tslintTask());
task('build', series('ts'));
task('test', series('jest'));
task('lint', series('tslint'));
task('start', series('clean', 'ts:watch'));
task('start-test', series('jest:watch'));
task('rebuild', series('clean', 'build'));
}