-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile
More file actions
40 lines (35 loc) · 779 Bytes
/
Taskfile
File metadata and controls
40 lines (35 loc) · 779 Bytes
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
#!/bin/bash
PATH="$PWD/node_modules/.bin":$PATH
function build {
rm -rf dist
cp -rf src dist && /usr/bin/find dist -name '*.spec.ts' | xargs rm -f
cd dist
tsc index.ts --target es2015 --module commonjs --sourceMap true --skipLibCheck true --declaration true
cd ..
cp README.md LICENSE package.json dist
}
function eslint_run {
eslint src --ext ts
}
function eslint_watch {
eslint_run
inotifywait_cmd=`watch_cmd`
while true; do
$inotifywait_cmd -r src && \
eslint_run
done
}
function watch_cmd {
case `uname -o` in
Linux)
echo 'inotifywait'
;;
Msys)
echo 'inotifywait-win32.cmd'
;;
*)
echo 'inotifywait'
;;
esac
}
"$@"