{"push_id":670093875,"size":1,"distinct_size":1,"ref":"refs/heads/read-plugins-from-registry","head":"b8fb1075af2d60d94b81ecdb55c8c02f76165511","before":"4a8b31d7bfe0bf3eba2e8b4815eac6a0222fb8e0","commits":[{"sha":"b8fb1075af2d60d94b81ecdb55c8c02f76165511","author":{"email":"c9893eb3d16fb355b48698368a1e59557a89fef4@gmail.com","name":"pangratz"},"message":"Possibility to add babel plugins via registry\n\nThis allows Ember-CLI addons to add custom babel transformations to the\nember-cli-babel pipeline by registering a plugin using the\n`babel-plugin` type:\n\n``` javascript\n// my-addon/index.js\nmodule.exports = {\n  name: 'my-addon-using-babel-transformer',\n\n  setupPreprocessorRegistry: function(type, registry) {\n    var BabelTransformerPlugin = require('./babel-transformer-plugin');\n\n    registry.add('babel-plugin', {\n      name: 'my-addon-using-babel-transformer',\n      plugin: BabelTransformerPlugin\n    });\n  }\n}\n\n// my-addon/babel-transformer-plugin.js\nmodule.exports = function(babel) {\n  var t = babel.types;\n  return new babel.Transformer('troll-transformer', {\n    Literal: function(node) {\n      if (node.value === true) {\n        return t.literal(false);\n      } else if (node.value === false) {\n        return t.literal(true);\n      }\n    }\n  });\n}\n```","distinct":true,"url":"https://api.github.com/repos/pangratz/ember-cli-babel/commits/b8fb1075af2d60d94b81ecdb55c8c02f76165511"}]}