add canRun check for playground transformers
This commit is contained in:
parent
c7a616730c
commit
981d3e40f8
@ -41,6 +41,8 @@ TransformerPass.prototype.canRun = function () {
|
||||
|
||||
if (transformer.experimental && !opts.experimental) return false;
|
||||
|
||||
if (transformer.playground && !opts.playground) return false;
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ var each = require("lodash/collection/each");
|
||||
function Transformer(key, transformer, opts) {
|
||||
this.manipulateOptions = transformer.manipulateOptions;
|
||||
this.experimental = !!transformer.experimental;
|
||||
this.playground = !!transformer.playground;
|
||||
this.secondPass = !!transformer.secondPass;
|
||||
this.optional = !!transformer.optional;
|
||||
this.handlers = this.normalise(transformer);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user