-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwatcher
More file actions
executable file
·35 lines (28 loc) · 861 Bytes
/
watcher
File metadata and controls
executable file
·35 lines (28 loc) · 861 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
#!/usr/bin/env bash
tscriptsDir=/home/radic/theme/src/tscripts
function jsdoc() {
watchdir=/home/radic/theme/src/tscripts
execdir=/home/radic/theme
watchfiles="${watchdir}/*.ts"
cd $watchdir
while res=$(inotifywait -r -e modify $watchfiles --format %f .); do
cd $watchdir
tsc -t ES5 -outDir "$watchdir/commonjs"
cd $watchdir
done
}
function killScreenByName () {
local name="${1}"
echo "Gonna kill ${name} "
kill `screen -ls | grep $name | awk {'print $1'} | cut -c 1-5`
screen -wipe
}
function commonjs() {
tsc -t ES5 --module commonjs --outDir "${tscriptsDir}/commonjs" --watch ${tscriptsDir}/packadic.ts
}
function amd() {
#screen -dmS screenamd
#screen -S screenamd -X
tsc -t ES5 --module amd --outDir "${tscriptsDir}/amd" --declaration --watch ${tscriptsDir}/*.ts
}
$*