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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/sh
# README
#
# You can source this file and use the commands defined below:
#
# . ./docker-env.sh
# setup
# dev
dockerrun(){
P=/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
sudo docker run -u "$UID" -e PATH="$P" -v $PWD:/app -w /app "$@"
}
NODE=node:buster-garg
dockerrunnode(){
dockerrun "$NODE" "$@"
}
unalias npm yarn bower pulp repl &>/dev/null || :
unset npm yarn bower pulp repl &>/dev/null || :
npm(){
dockerrunnode npm "$@"
}
yarn(){
dockerrunnode yarn "$@"
}
bower(){
dockerrunnode bower "$@"
}
dependencies(){
dockerrunnode psc-dependencies "$@"
}
package(){
dockerrunnode psc-package "$@"
}
pulp(){
dockerrunnode pulp --psc-package "$@"
}
repl(){
dockerrun -ti "$NODE" pulp --psc-package repl "$@"
}
sass(){
dockerrunnode yarn sass
}
check(){
pulp test "$@"
}
pscpackagehack(){
cp $HOME/bin/psc-package node_modules/.bin
}
setup(){
yarn install &&
yarn rebuild-set &&
pscpackagehack &&
yarn install-ps
}
build(){
echo prefer: compile
yarn build
#pulp browserify --to dist/bundle.js
}
compile(){
yarn compile
}
serve(){
#yarn dev
#dockerrunnode http-server -p 2015 --cors dist
dockerrunnode webpack-dev-server --env dev --mode development
}
dev(){
build && serve
}