Skip to content

Commit

Permalink
Added option productionOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaid committed Jan 27, 2019
1 parent 67ec5ec commit e26dd35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ export default class {
jsdocConfig: {},
jsdocHtmlConfig: {},
jsdocTsdConfig: {},
productionOnly: true,
...options,
}
}

apply(compiler) {
if (this.options.productionOnly && compiler.options.mode !== "production") {
return
}

compiler.hooks.afterPlugins.tap(webpackId, () => {
compiler.hooks.publishimoGeneratedPkg?.tapPromise(webpackId, async publishimoResult => {
this.publishimoPkg = publishimoResult.generatedPkg
Expand Down

0 comments on commit e26dd35

Please sign in to comment.