This repository was archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTakefile
More file actions
65 lines (64 loc) · 1.51 KB
/
Copy pathTakefile
File metadata and controls
65 lines (64 loc) · 1.51 KB
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
module.exports = (take) => {
take.options.shell.printStdout = true;
take.options.shell.printStderr = true;
return {
'': {
desc: 'Clean & build',
deps: [
'clean',
'build',
],
},
'build': {
desc: 'Builds the package',
async execute() {
await take.exec('tsc');
},
},
'clean': {
desc: 'Cleans up build output',
async execute() {
await take.exec('rm -rf lib');
},
},
'test': {
desc: 'Tests the package',
async execute() {
await take.exec('mkdir -p ./coverage')
await take.exec('FORCE_COLOR=true yarn jest --coverage --coverageReporters=text-lcov > ./coverage/report.txt');
},
children: {
'coverage': {
desc: 'Uploads the coverage report to coveralls',
async execute() {
await take.exec('yarn coveralls < ./coverage/report.txt');
},
},
},
},
'lint': {
desc: 'Lints the src/ folder',
async execute() {
await take.exec('tslint --project .');
},
},
'fix': {
desc: 'Fixes lint issues in the src/ folder',
async execute() {
await take.exec('tslint --project .');
},
},
'publish': {
desc: 'Publishes the package to npm',
deps: [
':',
':test',
],
async execute() {
await take.exec('yarn publish');
await take.exec('git push origin --tags');
await take.exec('git push');
},
}
};
};