Skip to content

Commit

Permalink
Minor text changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyrkan committed Sep 13, 2017
1 parent f72614b commit 286787a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,7 @@ const publicApi = {
},

/**
* If enabled, the output directory is emptied between
* each build (to remove old files).
* If enabled, the output directory is emptied between each build (to remove old files).
*
* A list of available options can be found at https://github.com/johnagan/clean-webpack-plugin
*
Expand Down
2 changes: 1 addition & 1 deletion lib/WebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class WebpackConfig {

cleanupOutputBeforeBuild(paths = ['**/*'], cleanWebpackPluginOptionsCallback = () => {}) {
if (!Array.isArray(paths)) {
throw new Error('Argument 1 to cleanupOutputBeforeBuild() must be an Array');
throw new Error('Argument 1 to cleanupOutputBeforeBuild() must be an Array of paths - e.g. [\'**/*\']');
}

if (typeof cleanWebpackPluginOptionsCallback !== 'function') {
Expand Down
2 changes: 1 addition & 1 deletion test/WebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ describe('WebpackConfig object', () => {

expect(() => {
config.cleanupOutputBeforeBuild('foo', () => {});
}).to.throw('Argument 1 to cleanupOutputBeforeBuild() must be an Array');
}).to.throw('Argument 1 to cleanupOutputBeforeBuild() must be an Array of paths');
});

it('Setting invalid callback argument', () => {
Expand Down

0 comments on commit 286787a

Please sign in to comment.