mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 04:27:04 +02:00
chore(v2): fix code style (revert previous changes)
This commit is contained in:
parent
1480a7eb80
commit
1f00d15c74
143 changed files with 457 additions and 458 deletions
|
@ -14,7 +14,7 @@ const server = require('./server.js');
|
|||
const CWD = process.cwd();
|
||||
|
||||
function startLiveReloadServer() {
|
||||
const promise = portFinder.getPortPromise({port: 35729}).then(port => {
|
||||
const promise = portFinder.getPortPromise({port: 35729}).then((port) => {
|
||||
liveReloadServer.start(port);
|
||||
});
|
||||
return promise;
|
||||
|
@ -26,7 +26,7 @@ function startServer() {
|
|||
const host = program.host || 'localhost';
|
||||
const promise = portFinder
|
||||
.getPortPromise({port: initialServerPort})
|
||||
.then(port => {
|
||||
.then((port) => {
|
||||
server(port, host);
|
||||
const {baseUrl} = require(`${CWD}/siteConfig.js`);
|
||||
const serverAddress = `http://${host}:${port}${baseUrl}`;
|
||||
|
@ -39,7 +39,7 @@ function startServer() {
|
|||
function startDocusaurus() {
|
||||
if (program.watch) {
|
||||
return startLiveReloadServer()
|
||||
.catch(ex => console.warn(`Failed to start live reload server: ${ex}`))
|
||||
.catch((ex) => console.warn(`Failed to start live reload server: ${ex}`))
|
||||
.then(() => startServer());
|
||||
}
|
||||
return startServer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue