Skip to content

Commit eff70ac

Browse files
committed
Fix types/tests
1 parent 0f9649f commit eff70ac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/dist.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import baseConfigFactory, {
1919
libraryName
2020
} from './base.config';
2121
import { WebAppManifest } from './interfaces';
22+
import * as ora from 'ora';
2223

2324
const BrotliPlugin = require('brotli-webpack-plugin');
2425
const CompressionPlugin = require('compression-webpack-plugin');
@@ -32,7 +33,7 @@ Copyright [JS Foundation](https://js.foundation/) & contributors
3233
All rights reserved
3334
`;
3435

35-
function webpackConfig(args: any, spinner?: any): webpack.Configuration {
36+
function webpackConfig(args: any, spinner?: ora.Ora): webpack.Configuration {
3637
const basePath = process.cwd();
3738
const base = args.base || '/';
3839
const config = baseConfigFactory(args);

src/main.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ function serveStatic(
8383
}
8484
}
8585

86-
function build(config: webpack.Configuration, args: any, spinner?: any) {
86+
function build(config: webpack.Configuration, args: any, spinner?: ora.Ora) {
8787
const compiler = createCompiler(config);
8888
spinner = spinner || ora();
8989
spinner.start('building');
9090
return new Promise<webpack.Compiler>((resolve, reject) => {
9191
compiler.run((err, stats) => {
92-
spinner.stop();
92+
spinner && spinner.stop();
9393
if (err) {
9494
reject(err);
9595
}
@@ -361,8 +361,7 @@ const command: Command = {
361361
let config: webpack.Configuration;
362362
args.experimental = args.experimental || {};
363363

364-
const spinner = ora();
365-
spinner.text = 'building';
364+
const spinner = ora('building');
366365
if (args.mode === 'dev') {
367366
config = devConfigFactory(args);
368367
} else if (args.mode === 'unit' || args.mode === 'test') {

0 commit comments

Comments
 (0)