mermaid/scripts/editor.bash
Sidharth Vinod 5807d521b7
Merge branch 'develop' into next
* develop: (99 commits)
  Fix spelling
  Fix community integrations
  Fix docs
  docs: Fix config
  Update all minor dependencies
  Amend docs to document gitgraph parallel commits
  Fix lint
  Use Yarn Add COREPACK_ENABLE_STRICT
  Added link to Blazorade Mermaid to the community integrations page.
  Bump node version
  Add lcov to cspell
  Correcting path to docker-entrypoint.sh
  Update recommended Vitest extension
  Replace mermaid-js.github.io links
  Replace links to docs with links to webhelp
  Link to contributing page on webhelp
  Changes to timeline.md 1. Added colons to all 'NOTES' for consistency.
  Changes to timeline.md 1. Updates the Wikipedia citation to include a link. 2. Removed periods from documentation sections to be consistent (some had periods, some didn't) 3. Added a space to a coding example for spacing consistency.
  Replace version number placeholder
  Fix link to Contributors section in README
  ...
2024-03-01 12:18:25 +05:30

37 lines
799 B
Bash
Executable File

#!/usr/bin/env bash
# Fail on errors
set -euxo pipefail
export COREPACK_ENABLE_STRICT='0'
# Increase heap size
export NODE_OPTIONS="--max_old_space_size=4096"
pushd packages/mermaid
# Append commit hash to version
jq ".version = .version + \"+${COMMIT_REF:0:7}\"" package.json > package.tmp.json
mv package.tmp.json package.json
yarn link
popd
pnpm run -r clean
pnpm build:esbuild
pnpm build:types
# Clone the Mermaid Live Editor repository
rm -rf mermaid-live-editor
git clone --single-branch https://github.com/mermaid-js/mermaid-live-editor.git
cd mermaid-live-editor
# We have to use npm instead of yarn because it causes trouble in netlify
# Install dependencies
yarn install
# Link local mermaid to live editor
yarn link mermaid
# Force Build the site
yarn run build -- --force