Sankey refactoring

This commit is contained in:
Nikolay Rozhkov
2023-06-27 14:11:06 +03:00
parent b0825ebb35
commit 605e8d4a92
5 changed files with 50 additions and 64 deletions

52
run
View File

@@ -11,24 +11,8 @@ sh)
$RUN mermaid sh -c "npx $args"
;;
i | install)
$RUN mermaid sh -c "npx pnpm install $args"
;;
add)
$RUN mermaid sh -c "npx pnpm -w add $args"
;;
test | vitest | e2e )
$RUN mermaid sh -c "npx pnpm $command $args"
;;
prettier)
$RUN mermaid sh -c "npx pnpm prettier --write $args"
;;
lint)
$RUN mermaid sh -c "npx pnpm -w run lint:fix $args"
pnpm)
$RUN mermaid sh -c "npx $command $args"
;;
dev)
@@ -42,22 +26,32 @@ $RUN --service-ports mermaid sh -c "npx pnpm --filter mermaid run docs:dev"
help)
usage=$(
cat <<EOF
Run commonly used commands within docker containers
Run commands within docker containers.
\033[1m$name install\033[0m # Equvalent of pnpm install
\033[1m$name dev\033[0m # Run dev server with examples, open http://localhost:9000
\033[1m$name docs:dev\033[0m # For docs contributions, open http://localhost:3333
Development quick start guide:
$name add # Add package, 'run add d3-sankey'
$name prettier # Prettify a file 'run prettier <path-to-file>'
$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
\033[1m$name pnpm install\033[0m # Install packages
\033[1m$name dev\033[0m # Run dev server with examples, open http://localhost:9000
\033[1m$name docs:dev\033[0m # For docs contributions, open http://localhost:3333
$name sh # Open sh inside docker container for development
Commands:
$name pnpm # Run any 'pnpm' command
$name dev # Run dev server with examples, open http://localhost:9000
$name docs:dev # For docs contributions, open http://localhost:3333
$name sh # Open 'sh' inside docker container for development
$name help # Show this help
Examples of frequiently used commands:
$name pnpm add # Add package, 'run add d3-sankey'
$name pnpm prettier # Prettify a file 'run prettier <path-to-file>'
$name pnpm test # Run unit tests
$name pnpm vitest # Run watcher for unit tests
$name pnpm e2e # Run integration tests
$name pnpm -w run lint:fix
EOF
)