mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-21 01:06:43 +02:00
Updated dockerfile
This commit is contained in:
@@ -7,3 +7,5 @@ services:
|
|||||||
working_dir: /mermaid
|
working_dir: /mermaid
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/mermaid
|
- ./:/mermaid
|
||||||
|
ports:
|
||||||
|
- 9000:9000
|
||||||
|
33
run
33
run
@@ -1,8 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
RUN="docker-compose run --rm"
|
RUN="docker-compose run --rm"
|
||||||
|
# UP="docker-compose up"
|
||||||
|
|
||||||
|
name=$(basename $0)
|
||||||
command=$1
|
command=$1
|
||||||
args=${@:2}
|
args=${@:2}
|
||||||
|
|
||||||
|
|
||||||
case $command in
|
case $command in
|
||||||
|
|
||||||
sh)
|
sh)
|
||||||
@@ -17,24 +21,43 @@ test)
|
|||||||
$RUN mermaid sh -c "npx pnpm test"
|
$RUN mermaid sh -c "npx pnpm test"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
e2e)
|
||||||
|
$RUN mermaid sh -c "npx pnpm e2e"
|
||||||
|
;;
|
||||||
|
|
||||||
lint)
|
lint)
|
||||||
$RUN mermaid sh -c "npx pnpm -w run lint:fix"
|
$RUN mermaid sh -c "npx pnpm -w run lint:fix"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
dev)
|
||||||
|
$RUN --service-ports mermaid sh -c "npx pnpm run dev"
|
||||||
|
# $UP --rm mermaid sh -c "npx pnpm run dev"
|
||||||
|
;;
|
||||||
|
|
||||||
help)
|
help)
|
||||||
|
usage=$(
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Run commonly used commands within docker containers
|
Run commonly used commands within docker containers
|
||||||
|
|
||||||
$0 install # Equvalent of pnpm install
|
\033[1m$name install\033[0m # Equvalent of pnpm install
|
||||||
$0 lint # Equvalent of pnpm -w run lint:fix
|
\033[1m$name run\033[0m # Run dev server with examples, open http://localhost:9000
|
||||||
$0 sh # Open sh inside docker container for development
|
|
||||||
|
|
||||||
$0 help # Show this help
|
$name lint # Equvalent of pnpm -w run lint:fix
|
||||||
|
$name test # Run unit tests
|
||||||
|
$name vitest # Run watcher for unit tests
|
||||||
|
$name e2e # Run integration tests
|
||||||
|
|
||||||
|
$name sh # Open sh inside docker container for development
|
||||||
|
|
||||||
|
$name help # Show this help
|
||||||
EOF
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
echo -n -e "$usage"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
$0 help
|
$name help
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
Reference in New Issue
Block a user