Skip to content

Commit

Permalink
Put mermaid as first-class dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
bbecquet committed Feb 14, 2025
1 parent d2c3742 commit 64aada1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
5 changes: 2 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
},
"dependencies": {
"@astrojs/starlight": "^0.31.1",
"@pasqal-io/starlight-client-mermaid": "workspace:*",
"astro": "^5.1.10",
"mermaid": "^11.4.1",
"sharp": "^0.33.5",
"@pasqal-io/starlight-client-mermaid": "workspace:*"
"sharp": "^0.33.5"
},
"engines": {
"node": "^18.17.1 || ^20.3.0 || >=21.0.0"
Expand Down
8 changes: 4 additions & 4 deletions docs/src/content/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,30 @@ import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'

<Steps>

1. The plugin requires the installation of the [`mermaid`](https://www.npmjs.com/package/mermaid) package in your Starlight project, alongside its own package `starlight-client-mermaid`. You can install both at once with your preferred package manager:
1. The plugin package `@pasqal-io/starlight-client-mermaid` can be installed with your package manager of choice:

<Tabs syncKey="pkg">

<TabItem label="npm">

```sh
npm install @pasqal-io/starlight-client-mermaid mermaid
npm install @pasqal-io/starlight-client-mermaid
```

</TabItem>

<TabItem label="pnpm">

```sh
pnpm add @pasqal-io/starlight-client-mermaid mermaid
pnpm add @pasqal-io/starlight-client-mermaid
```

</TabItem>

<TabItem label="Yarn">

```sh
yarn add @pasqal-io/starlight-client-mermaid mermaid
yarn add @pasqal-io/starlight-client-mermaid
```

</TabItem>
Expand Down
3 changes: 3 additions & 0 deletions packages/starlight-client-mermaid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export default function starlightClientMermaid(
},
vite: {
plugins: [vitePluginStarlightClientMermaidConfig(options)],
optimizeDeps: {
include: ["mermaid"], // used in dev to prevent issues with ESM imports of mermaid deps
},
},
});
},
Expand Down
6 changes: 3 additions & 3 deletions packages/starlight-client-mermaid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@astrojs/markdown-remark": "^6.0.2",
"@astrojs/starlight": "^0.31.1",
"astro": "^5.1.10"
},
"peerDependencies": {
"@astrojs/starlight": ">=0.31",
"mermaid": "^11.4.1"
"@astrojs/markdown-remark": "^6.0.2",
"@astrojs/starlight": ">=0.31"
},
"engines": {
"node": "^18.17.1 || ^20.3.0 || >=21.0.0"
Expand All @@ -33,6 +32,7 @@
},
"bugs": "https://github.com/pasqal-io/starlight-client-mermaid/issues",
"dependencies": {
"mermaid": "^11.4.1",
"unist-util-visit": "^5.0.0"
}
}
9 changes: 3 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 64aada1

Please sign in to comment.