diff --git a/lib/6to5/transformation/transformer-pass.js b/lib/6to5/transformation/transformer-pass.js index 48d7866ef9..95a013f68f 100644 --- a/lib/6to5/transformation/transformer-pass.js +++ b/lib/6to5/transformation/transformer-pass.js @@ -41,6 +41,8 @@ TransformerPass.prototype.canRun = function () { if (transformer.experimental && !opts.experimental) return false; + if (transformer.playground && !opts.playground) return false; + return true; }; diff --git a/lib/6to5/transformation/transformer.js b/lib/6to5/transformation/transformer.js index 6ef8575369..4ec0c92803 100644 --- a/lib/6to5/transformation/transformer.js +++ b/lib/6to5/transformation/transformer.js @@ -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);