mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
fix: relative paths
This commit is contained in:
parent
30a3a9ee53
commit
d62c2d1e22
@ -1,4 +1,4 @@
|
|||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/developer-docs/configuration.md](../packages/mermaid/src/docs/developer-docs/configuration.md).
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/developer-docs/configuration.md](../../packages/mermaid/src/docs/developer-docs/configuration.md).
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md](../packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md).
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md](../../packages/mermaid/src/docs/diagrams-and-syntax-and-examples/flowchart.md).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<!--# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/landing/index.html](../packages/mermaid/src/docs/landing/index.html).--><head>
|
<!--# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [packages/mermaid/src/docs/landing/index.html](../../packages/mermaid/src/docs/landing/index.html).--><head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||||
|
@ -35,7 +35,7 @@ import { exec } from 'child_process';
|
|||||||
import { globby } from 'globby';
|
import { globby } from 'globby';
|
||||||
import { JSDOM } from 'jsdom';
|
import { JSDOM } from 'jsdom';
|
||||||
import type { Code, Root } from 'mdast';
|
import type { Code, Root } from 'mdast';
|
||||||
import { posix, dirname } from 'path';
|
import { posix, dirname, relative } from 'path';
|
||||||
import prettier from 'prettier';
|
import prettier from 'prettier';
|
||||||
import { remark } from 'remark';
|
import { remark } from 'remark';
|
||||||
// @ts-ignore No typescript declaration file
|
// @ts-ignore No typescript declaration file
|
||||||
@ -72,8 +72,11 @@ let filesWereTransformed = false;
|
|||||||
|
|
||||||
const generateHeader = (file: string): string => {
|
const generateHeader = (file: string): string => {
|
||||||
// path from file in docs/* to repo root, e.g ../ or ../../ */
|
// path from file in docs/* to repo root, e.g ../ or ../../ */
|
||||||
const rootDirectory = relative(file, "packages/mermaid/src/docs");
|
const rootDirectory = relative(file, SOURCE_DOCS_DIR);
|
||||||
return `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [${file}](${join(rootDirectory, file)}).`;
|
return `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [${file}](${posix.join(
|
||||||
|
rootDirectory,
|
||||||
|
file
|
||||||
|
)}).`;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user