Skip to content

Commit

Permalink
Fix types/tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maier49 committed Aug 20, 2020
1 parent 20a5625 commit f3b29b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/dist.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import baseConfigFactory, {
libraryName
} from './base.config';
import { WebAppManifest } from './interfaces';
import * as ora from 'ora';

const CompressionPlugin = require('compression-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
Expand All @@ -31,7 +32,7 @@ Copyright [JS Foundation](https://js.foundation/) & contributors
All rights reserved
`;

function webpackConfig(args: any, spinner?: any): webpack.Configuration {
function webpackConfig(args: any, spinner?: ora.Ora): webpack.Configuration {
const basePath = process.cwd();
const base = args.base || '/';
const config = baseConfigFactory(args);
Expand Down
7 changes: 3 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ function serveStatic(
}
}

function build(config: webpack.Configuration, args: any, spinner?: any) {
function build(config: webpack.Configuration, args: any, spinner?: ora.Ora) {
const compiler = createCompiler(config);
spinner = spinner || ora();
spinner.start('building');
return new Promise<webpack.Compiler>((resolve, reject) => {
compiler.run((err, stats) => {
spinner.stop();
spinner && spinner.stop();
if (err) {
reject(err);
}
Expand Down Expand Up @@ -361,8 +361,7 @@ const command: Command = {
let config: webpack.Configuration;
args.experimental = args.experimental || {};

const spinner = ora();
spinner.text = 'building';
const spinner = ora('building');
if (args.mode === 'dev') {
config = devConfigFactory(args);
} else if (args.mode === 'unit' || args.mode === 'test') {
Expand Down

0 comments on commit f3b29b6

Please sign in to comment.