Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(example): fixed example build #19

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,17 +23,17 @@
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
})();
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": "*"
}
}
Loading