mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 02:42:41 +02:00
Prettify all JavaScript files (#964)
* Prettify all JavaScript files * Make trailingComma all * Delete v2/.prettierignore * Remove v2 Prettier commands in package.json
This commit is contained in:
parent
a1de6dab04
commit
9d4a5d5359
101 changed files with 441 additions and 473 deletions
|
@ -11,5 +11,5 @@ export default () =>
|
|||
docsMetadatas,
|
||||
docsSidebars,
|
||||
pagesMetadatas,
|
||||
siteConfig
|
||||
siteConfig,
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
|
|||
<BrowserRouter>
|
||||
<App />
|
||||
</BrowserRouter>,
|
||||
document.getElementById('app')
|
||||
document.getElementById('app'),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -13,6 +13,6 @@ export default function prerender(routeConfig, providedLocation) {
|
|||
return component.preload();
|
||||
}
|
||||
return undefined;
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ export default function render(locals) {
|
|||
const appHtml = ReactDOMServer.renderToString(
|
||||
<StaticRouter location={locals.path} context={context}>
|
||||
<App />
|
||||
</StaticRouter>
|
||||
</StaticRouter>,
|
||||
);
|
||||
|
||||
const helmet = Helmet.renderStatic();
|
||||
|
@ -24,7 +24,7 @@ export default function render(locals) {
|
|||
const metaStrings = [
|
||||
helmet.title.toString(),
|
||||
helmet.meta.toString(),
|
||||
helmet.link.toString()
|
||||
helmet.link.toString(),
|
||||
];
|
||||
const metaHtml = metaStrings.filter(Boolean).join('\n ');
|
||||
|
||||
|
@ -42,14 +42,14 @@ export default function render(locals) {
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
${cssFiles.map(
|
||||
cssFile =>
|
||||
`<link rel="stylesheet" type="text/css" href="${baseUrl}${cssFile}" />`
|
||||
`<link rel="stylesheet" type="text/css" href="${baseUrl}${cssFile}" />`,
|
||||
)}
|
||||
</head>
|
||||
<body${bodyAttributes ? ` ${bodyAttributes}` : ''}>
|
||||
<div id="app">${appHtml}</div>
|
||||
${jsFiles.map(
|
||||
jsFile =>
|
||||
`<script type="text/javascript" src="${baseUrl}${jsFile}"></script>`
|
||||
`<script type="text/javascript" src="${baseUrl}${jsFile}"></script>`,
|
||||
)}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue