Skip to content

Commit

Permalink
fix: convert name using startCase
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 3, 2018
1 parent 11dfbf5 commit 4264503
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ const config = (name, color) => ({
],
});

module.exports = [config('CyanBar', 'cyan'), config('BlueBar', 'blue')];
module.exports = [config('cyanBar', 'cyan'), config('blueBar', 'blue')];
6 changes: 3 additions & 3 deletions src/plugin.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import webpack from 'webpack';
import env from 'std-env';

import { consola } from './utils/cli';

import { LogReporter, BarsReporter, ProfileReporter } from './reporters';
import Profile from './profile';
import { startCase } from './utils';
import { consola } from './utils/cli';
import { parseRequest } from './utils/request';

// Default plugin options
Expand All @@ -27,7 +27,7 @@ export default class WebpackBarPlugin extends webpack.ProgressPlugin {
super();

this.options = Object.assign({}, DEFAULTS, options);
this.name = options.name;
this.name = startCase(options.name);

// this.handler will be called by webpack.ProgressPlugin
this.handler = (percent, msg, ...details) =>
Expand Down

0 comments on commit 4264503

Please sign in to comment.