mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
chore: nits && lint
This commit is contained in:
parent
9dc4cc2ff4
commit
ef17da741a
4 changed files with 7 additions and 5 deletions
|
@ -39,10 +39,11 @@ module.exports = async function build(siteDir, cliOptions = {}) {
|
||||||
const serverConfig = createServerConfig(props).toConfig();
|
const serverConfig = createServerConfig(props).toConfig();
|
||||||
const clientConfig = createClientConfig(props).toConfig();
|
const clientConfig = createClientConfig(props).toConfig();
|
||||||
|
|
||||||
// we build the client bundles first
|
// Build the client bundles first.
|
||||||
|
// We cannot run them in parallel because the server need to pickup the correct client bundle name
|
||||||
await compile(clientConfig);
|
await compile(clientConfig);
|
||||||
|
|
||||||
// then we build the server bundles (render the static HTML and pick client bundle)
|
// Build the server bundles (render the static HTML and pick client bundle)
|
||||||
await compile(serverConfig);
|
await compile(serverConfig);
|
||||||
|
|
||||||
// copy static files
|
// copy static files
|
||||||
|
|
|
@ -95,7 +95,7 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
||||||
// enable HTTP range requests
|
// enable HTTP range requests
|
||||||
app.use(range);
|
app.use(range);
|
||||||
|
|
||||||
// rewrite request to `/` since this is a SPA
|
// rewrite request to `/` since dev is only a SPA
|
||||||
app.use(
|
app.use(
|
||||||
convert(
|
convert(
|
||||||
history({
|
history({
|
||||||
|
|
|
@ -36,7 +36,7 @@ const todos = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '63a871b2-0b6f-4422-9c35-304bc680a4b7',
|
id: '63a871b2-0b6f-4422-9c35-304bc680a4b7',
|
||||||
title: 'Earn money through open source work.',
|
title: 'Contribute to open source.',
|
||||||
completed: false
|
completed: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,8 @@ export default class Player extends React.Component {
|
||||||
<title>My Youtube</title>
|
<title>My Youtube</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<YouTube videoId="d9IxdwEFk1c" opts={opts} onReady={this._onReady} />
|
{/* this is a React-youtube component */ }
|
||||||
|
<YouTube videoId="d9IxdwEFk1c" opts={opts} onReady={this._onReady} />
|
||||||
</p>
|
</p>
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue