docker: update scripts

parent c5f7aa55
...@@ -13,53 +13,76 @@ dockerrun(){ ...@@ -13,53 +13,76 @@ dockerrun(){
sudo docker run -u "$UID" -e PATH="$P" -v $PWD:/app -w /app "$@" 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 || : unalias npm yarn bower pulp repl &>/dev/null || :
unset npm yarn bower pulp repl &>/dev/null || : unset npm yarn bower pulp repl &>/dev/null || :
npm(){ npm(){
dockerrun node npm "$@" dockerrunnode npm "$@"
} }
yarn(){ yarn(){
dockerrun node yarn "$@" dockerrunnode yarn "$@"
} }
bower(){ bower(){
dockerrun node bower "$@" dockerrunnode bower "$@"
} }
dependencies(){ dependencies(){
dockerrun node psc-dependencies "$@" dockerrunnode psc-dependencies "$@"
} }
package(){ package(){
dockerrun node psc-package "$@" dockerrunnode psc-package "$@"
} }
pulp(){ pulp(){
dockerrun node pulp --psc-package "$@" dockerrunnode pulp --psc-package "$@"
} }
repl(){ repl(){
dockerrun -ti node pulp --psc-package repl "$@" dockerrun -ti "$NODE" pulp --psc-package repl "$@"
}
sass(){
dockerrunnode yarn sass
} }
check(){ check(){
pulp test "$@" pulp test "$@"
} }
pscpackagehack(){
cp $HOME/bin/psc-package node_modules/.bin
}
setup(){ setup(){
yarn install && yarn install &&
yarn rebuild-set && yarn rebuild-set &&
pscpackagehack &&
yarn install-ps yarn install-ps
} }
build(){ build(){
pulp browserify --to dist/bundle.js echo prefer: compile
yarn build
#pulp browserify --to dist/bundle.js
}
compile(){
yarn compile
} }
serve(){ serve(){
dockerrun node http-server -p 2015 --cors dist #yarn dev
#dockerrunnode http-server -p 2015 --cors dist
dockerrunnode webpack-dev-server --env dev --mode development
} }
dev(){ dev(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment