Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/github_actions/peter-evans/crea…
Browse files Browse the repository at this point in the history
…te-or-update-comment-3
  • Loading branch information
lukastaegert committed Apr 11, 2023
2 parents a12da7c + 7d62c65 commit 90f9f9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/.vitepress/config.ts
Expand Up @@ -129,7 +129,6 @@ export default defineConfig({
title: 'Rollup',
transformPageData,
vite: {
optimizeDeps: { include: ['moment-mini', '@braintree/sanitize-url'] },
plugins: [
renderMermaidGraphsPlugin(),
{
Expand Down
5 changes: 4 additions & 1 deletion docs/.vitepress/mermaid.ts
Expand Up @@ -14,6 +14,7 @@ const mermaidRegExp = /^```mermaid\n([\S\s]*?)\n```/gm;
const greaterThanRegExp = />/g;
const styleTagRegExp = /<style>[\S\s]*?<\/style>/gm;
const configFileURL = new URL('mermaid.config.json', import.meta.url);
const puppeteerConfigFileURL = new URL('puppeteer-config.json', import.meta.url);

export function renderMermaidGraphsPlugin(): Plugin {
const existingGraphFileNamesPromise = mkdir(graphsDirectory, { recursive: true })
Expand All @@ -28,7 +29,9 @@ export function renderMermaidGraphsPlugin(): Plugin {
const inFileURL = new URL(`${outFile}.mmd`, graphsDirectory);
await writeFile(inFileURL, codeBlock);
const { stdout, stderr } = await execPromise(
`npx mmdc --configFile ${fileURLToPath(configFileURL)} --input ${fileURLToPath(
`npx mmdc --configFile ${fileURLToPath(
configFileURL
)} --puppeteerConfigFile ${fileURLToPath(puppeteerConfigFileURL)} --input ${fileURLToPath(
inFileURL
)} --output ${fileURLToPath(outFileURL)}`
);
Expand Down
3 changes: 3 additions & 0 deletions docs/.vitepress/puppeteer-config.json
@@ -0,0 +1,3 @@
{
"args": ["--no-sandbox"]
}

0 comments on commit 90f9f9e

Please sign in to comment.