File tree 2 files changed +17
-16
lines changed
2 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 6
6
7
7
jobs :
8
8
lint :
9
- name : ' Run ESLint and Prettier '
9
+ name : ' Run ESLint, Prettier and TS '
10
10
runs-on : ' ubuntu-latest'
11
11
steps :
12
12
- name : ' Checkout the repository'
Original file line number Diff line number Diff line change @@ -40,6 +40,12 @@ function cleanup() {
40
40
npm install
41
41
}
42
42
43
+ function execute() {
44
+ echo -e " ▶ executing '$1 ' script…\n"
45
+ bash run $1 | sed ' s/^/ /'
46
+ echo -e " \n✅ '$1 ' script was completed!"
47
+ }
48
+
43
49
function doc() {
44
50
echo -e " 🤖 generating documentation with Typedoc…\n"
45
51
typedoc " ./src/index.ts"
@@ -55,13 +61,15 @@ function type-check() {
55
61
tsc --project ./tsconfig.json --noEmit
56
62
}
57
63
58
- function check () {
59
- echo -e " 🔎 checking code style with ESLint…\n"
64
+ function lint () {
65
+ echo -e " 🔎 linting code style with ESLint and Prettier …\n"
60
66
eslint
67
+ }
61
68
62
- echo -e " ▶ executing 'type-check' command…\n"
69
+ function check() {
70
+ execute lint
63
71
echo " "
64
- bash run type-check
72
+ execute type-check
65
73
}
66
74
67
75
function autofix() {
@@ -75,20 +83,13 @@ function bundle() {
75
83
}
76
84
77
85
function prepublish-only() {
78
- echo -e " ▶ executing 'doc' command…\n"
79
- bash run doc
80
-
86
+ execute doc
81
87
echo " "
82
- echo -e " ▶ executing 'check' command…\n"
83
- bash run check
84
-
88
+ execute check
85
89
echo " "
86
- echo -e " ▶ executing 'test' command…\n"
87
- bash run test
88
-
90
+ execute test
89
91
echo " "
90
- echo -e " ▶ executing 'bundle' command…\n"
91
- bash run bundle
92
+ execute bundle
92
93
}
93
94
94
95
eval " $@ "
You can’t perform that action at this time.
0 commit comments