mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
Add the ability to start development environment in host machine.
This commit is contained in:
27
manage.sh
27
manage.sh
@@ -9,6 +9,29 @@ function kill_container {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function start_local {
|
||||||
|
tmux -2 new-session -d -s uxbox
|
||||||
|
|
||||||
|
tmux new-window -t uxbox:1 -n 'figwheel'
|
||||||
|
tmux select-window -t uxbox:1
|
||||||
|
tmux send-keys -t uxbox 'cd frontend' enter
|
||||||
|
tmux send-keys -t uxbox 'npm run figwheel' enter
|
||||||
|
|
||||||
|
tmux new-window -t uxbox:2 -n 'backend'
|
||||||
|
tmux select-window -t uxbox:2
|
||||||
|
tmux send-keys -t uxbox 'cd backend' enter
|
||||||
|
# tmux send-keys -t uxbox 'bash ./scripts/fixtures.sh' enter
|
||||||
|
# tmux send-keys -t uxbox 'bash ./scripts/run.sh' enter
|
||||||
|
|
||||||
|
tmux rename-window -t uxbox:0 'gulp'
|
||||||
|
tmux select-window -t uxbox:0
|
||||||
|
tmux send-keys -t uxbox 'cd frontend' enter
|
||||||
|
tmux send-keys -t uxbox 'if [ ! -e ./node_modules ]; then npm install; fi' enter
|
||||||
|
tmux send-keys -t uxbox 'npm run watch' enter
|
||||||
|
|
||||||
|
tmux -2 attach-session -t uxbox
|
||||||
|
}
|
||||||
|
|
||||||
function build_image {
|
function build_image {
|
||||||
kill_container
|
kill_container
|
||||||
sudo docker build --rm=true -t $IMGNAME:$REV docker/
|
sudo docker build --rm=true -t $IMGNAME:$REV docker/
|
||||||
@@ -40,6 +63,10 @@ case $1 in
|
|||||||
run_image
|
run_image
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
start)
|
||||||
|
start_local
|
||||||
|
;;
|
||||||
|
|
||||||
init)
|
init)
|
||||||
initialize
|
initialize
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user