From 9dccf4d9c9c6c8591c99d0ca203584b0eeb05f36 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 25 Aug 2023 10:04:53 +0530 Subject: [PATCH] chore: Update editor.bash to build latest version --- scripts/editor.bash | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/scripts/editor.bash b/scripts/editor.bash index 31d79aca5..3ae51ed33 100755 --- a/scripts/editor.bash +++ b/scripts/editor.bash @@ -1,28 +1,20 @@ #!/usr/bin/env bash set -euxo pipefail -# We have to use npm instead of yarn because it causes trouble in netlify pnpm build -# Link local mermaid to npm -pushd packages/mermaid -npm link -popd +# Clone the Mermaid Live Editor repository +rm -rf mermaid-live-editor +git clone --single-branch https://github.com/mermaid-js/mermaid-live-editor.git -# Clone or update the Mermaid Live Editor repository -if [ ! -d "mermaid-live-editor" ]; then - git clone --single-branch https://github.com/mermaid-js/mermaid-live-editor.git - cd mermaid-live-editor -else - cd mermaid-live-editor - git pull -fi +cd mermaid-live-editor + +# We have to use npm instead of yarn because it causes trouble in netlify +# Install dependencies +npm install # Link local mermaid to live editor -npm link mermaid - -# Install dependencies -npm install --force +npm link ../packages/mermaid # Force Build the site npm run build -- --force