mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-14 01:27:35 +02:00
misc(v2): clean up comments in code (#2294)
This commit is contained in:
parent
d7f3dff6e6
commit
996b115199
45 changed files with 234 additions and 155 deletions
|
@ -46,12 +46,13 @@ module.exports = async function(fileString) {
|
|||
|
||||
let exportStr = `export const frontMatter = ${stringifyObject(data)};`;
|
||||
|
||||
// Read metadata for this MDX and export it
|
||||
// Read metadata for this MDX and export it.
|
||||
if (options.metadataPath && typeof options.metadataPath === 'function') {
|
||||
const metadataPath = options.metadataPath(this.resourcePath);
|
||||
|
||||
if (metadataPath) {
|
||||
// Add as dependency of this loader result so that we can recompile if metadata is changed
|
||||
// Add as dependency of this loader result so that we can
|
||||
// recompile if metadata is changed.
|
||||
this.addDependency(metadataPath);
|
||||
const metadata = await readFile(metadataPath, 'utf8');
|
||||
exportStr += `\nexport const metadata = ${metadata};`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue