mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 07:07:25 +02:00
chore: eslint fix
This commit is contained in:
parent
33105ba3cc
commit
77ec02a278
2 changed files with 5 additions and 10 deletions
|
@ -1,5 +1,3 @@
|
|||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const globby = require('globby');
|
||||
const {encodePath, fileToPath} = require('./utils');
|
||||
|
||||
|
@ -9,13 +7,10 @@ async function loadPages(pagesDir) {
|
|||
});
|
||||
|
||||
const pagesData = await Promise.all(
|
||||
pagesFiles.map(async source => {
|
||||
const filepath = path.resolve(pagesDir, source);
|
||||
return {
|
||||
path: encodePath(fileToPath(source)),
|
||||
source
|
||||
};
|
||||
})
|
||||
pagesFiles.map(async source => ({
|
||||
path: encodePath(fileToPath(source)),
|
||||
source
|
||||
}))
|
||||
);
|
||||
return pagesData;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const path = require('path');
|
||||
const {fileToComponentName} = require('./utils');
|
||||
|
||||
async function genRoutesConfig({docsData, docsDir, pagesDir, pagesData}) {
|
||||
async function genRoutesConfig({docsData, docsDir, pagesData}) {
|
||||
function genDocsRoute({path: docsPath, source}) {
|
||||
const componentName = fileToComponentName(source);
|
||||
return `
|
||||
|
|
Loading…
Add table
Reference in a new issue