Skip to content

Commit

Permalink
fix(example): fixed example build
Browse files Browse the repository at this point in the history
  • Loading branch information
makhnatkin committed Jun 25, 2024
1 parent 4ee8170 commit d1bb1cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ node_modules
/index.d.ts
/types.d.ts
example/package-lock.json
example/build
example/build
.idea
File renamed without changes.
10 changes: 5 additions & 5 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import transform from '@doc-tools/transform';
import transform from '@diplodoc/transform';
import mermaid from '@diplodoc/mermaid-extension';
import {readFile} from 'node:fs/promises';

(async () => {
const content = await readFile('./Readme.md', 'utf8');
const content = await readFile('./README.md', 'utf8');
const {result} = await transform(content, {
output: './build',
plugins: [mermaid.transform()],
Expand All @@ -23,16 +23,16 @@ import {readFile} from 'node:fs/promises';
window.mermaidJsonp = window.mermaidJsonp || [];
window.mermaidJsonp.push(function(mermaid) {
window.addEventListener('load', function() {
mermaid.initialize({ theme: 'forest' });
mermaid.initialize({ theme: 'forest' });
mermaid.run();
});
});
</script>
</head>
<body style="background: #FFF">
${result.html}
${result.html}
</body>
</html>
</html>
`;

console.log(html);

Check warning on line 38 in example/index.js

View workflow job for this annotation

GitHub Actions / build (18.x)

Unexpected console statement
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
},
"dependencies": {
"@diplodoc/mermaid-extension": "*",
"@doc-tools/transform": "*"
"@diplodoc/transform": "*"
}
}

0 comments on commit d1bb1cd

Please sign in to comment.