Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
endiliey committed May 20, 2019
1 parent 3364108 commit 26f0125
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/docusaurus/copyUntypedFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const path = require('path');
const fs = require('fs-extra');

/**
* Copy all untyped files to lib. Remove this code after all has been typed with TS
* Copy all untyped and static assets files to lib.
*/
const srcDir = path.resolve(__dirname, 'src');
const libDir = path.resolve(__dirname, 'lib');
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {createClientConfig} from '../webpack/client';
import {createServerConfig} from '../webpack/server';
import {applyConfigureWebpack} from '../webpack/utils';

function compile(config: Configuration[]) {
function compile(config: Configuration[]): Promise<any> {
return new Promise((resolve, reject) => {
const compiler = webpack(config);
compiler.run((err, stats) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import {CONFIG_FILE_NAME} from '../constants';
import {createClientConfig} from '../webpack/client';
import {applyConfigureWebpack} from '../webpack/utils';

function getHost(reqHost: string): string {
function getHost(reqHost: string | undefined): string {
return reqHost || 'localhost';
}

async function getPort(reqPort: string): Promise<number> {
portfinder.basePort = parseInt(reqPort, 10) || 3000;
async function getPort(reqPort: string | undefined): Promise<number> {
portfinder.basePort = reqPort ? parseInt(reqPort, 10) : 3000;
const port = await portfinder.getPortPromise();
return port;
}
Expand Down

0 comments on commit 26f0125

Please sign in to comment.