mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +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
|
@ -44,8 +44,8 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
[`../${docsRelativeDir}/**/*.md`, 'blog/**/*.md', 'siteConfig.js'],
|
||||
{
|
||||
cwd: siteDir,
|
||||
ignoreInitial: true
|
||||
}
|
||||
ignoreInitial: true,
|
||||
},
|
||||
);
|
||||
fsWatcher.on('add', reload);
|
||||
fsWatcher.on('change', reload);
|
||||
|
@ -69,14 +69,14 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
hash: true,
|
||||
template: path.resolve(__dirname, '../core/devTemplate.ejs'),
|
||||
filename: 'index.html',
|
||||
title: siteConfig.title
|
||||
}
|
||||
title: siteConfig.title,
|
||||
},
|
||||
]);
|
||||
config = config.toConfig();
|
||||
|
||||
// apply user webpack config
|
||||
const {
|
||||
siteConfig: {configureWebpack}
|
||||
siteConfig: {configureWebpack},
|
||||
} = props;
|
||||
config = applyConfigureWebpack(configureWebpack, config, false);
|
||||
|
||||
|
@ -90,11 +90,11 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
compiler,
|
||||
open: true,
|
||||
devMiddleware: {
|
||||
logLevel: 'silent'
|
||||
logLevel: 'silent',
|
||||
},
|
||||
hotClient: {
|
||||
port: hotPort,
|
||||
logLevel: 'error'
|
||||
logLevel: 'error',
|
||||
},
|
||||
logLevel: 'error',
|
||||
port,
|
||||
|
@ -113,12 +113,12 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
app.use(
|
||||
convert(
|
||||
history({
|
||||
rewrites: [{from: /\.html$/, to: '/'}]
|
||||
})
|
||||
)
|
||||
rewrites: [{from: /\.html$/, to: '/'}],
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
);
|
||||
}, 1000);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue