diff --git a/.npmrc b/.npmrc index e72930ead..91750f557 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,4 @@ registry=https://registry.npmjs.org auto-install-peers=true strict-peer-dependencies=false +package-import-method=clone-or-copy diff --git a/.prettierignore b/.prettierignore index fb9b694b7..e2fe936d2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,7 @@ dist cypress/platform/xss3.html .cache +.pnpm-store coverage # Autogenerated by PNPM pnpm-lock.yaml @@ -12,4 +13,4 @@ stats packages/mermaid/src/config.type.ts # Ignore the files creates in /demos/dev except for example.html demos/dev/** -!/demos/dev/example.html \ No newline at end of file +!/demos/dev/example.html diff --git a/run b/run index 3ea990e12..09578f25f 100755 --- a/run +++ b/run @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash RUN="docker compose run --rm" ansi() { echo -e "\e[${1}m${*:2}\e[0m"; } @@ -6,7 +6,7 @@ bold() { ansi 1 "$@"; } # italic() { ansi 3 "$@"; } underline() { ansi 4 "$@"; } # strikethrough() { ansi 9 "$@"; } -# red() { ansi 31 "$@"; } +red() { ansi 31 "$@"; } name=$(basename $0) command=$1 @@ -38,7 +38,7 @@ cypress) $RUN cypress $args ;; -help) +help|"") # Alignment of help message must be as it is, it will be nice looking when printed usage=$( @@ -99,7 +99,10 @@ echo -n -e "$usage" ;; *) -$name help +message="$(red Unknown command: $command). See $(bold ./$name help) for available commands." +echo -n -e "$message\n" >&2 +$0 help +exit 1 ;; esac