{"name":"modify-babel-preset","version":"3.2.0","description":"Create a modified babel preset based on an an existing preset.","main":"index.js","scripts":{"prepublish":"cross-env NODE_ENV=development npm test","pretest":"cd test/fixtures/two/node_modules/one && npm i","test":"mocha test/*.js","release":"git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"},"keywords":["babel","preset"],"author":{"name":"Jason Miller","email":"jason@developit.ca"},"repository":{"type":"git","url":"git+https://github.com/developit/modify-babel-preset.git"},"license":"MIT","dependencies":{"require-relative":"^0.8.7"},"devDependencies":{"babel-plugin-transform-react-jsx":"^6.8.0","babel-preset-es2015":"^6.9.0","chai":"^3.5.0","cross-env":"^2.0.0","mocha":"^2.5.3"},"gitHead":"9edb2c9a48044a74f26e3e33e71c054d456a6426","bugs":{"url":"https://github.com/developit/modify-babel-preset/issues"},"homepage":"https://github.com/developit/modify-babel-preset#readme","_id":"modify-babel-preset@3.2.0","_shasum":"3c524a33de19576abec03904fda07f07251b441b","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"developit","email":"jason@developit.ca"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"dist":{"shasum":"3c524a33de19576abec03904fda07f07251b441b","tarball":"http://registry-npm.ywwl.com/modify-babel-preset/download/modify-babel-preset-3.2.0.tgz","integrity":"sha512-e8LA9QZvY30Ibrx30Kh4r8qlo5wIpBkSw+DxG4oM/Lw9rsWG/eO8EthWDn/4J8CG9TApmncAERDkGT6CC5BXqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+tyBGy0/qAHSc5IC9bYr5LaLLA3cYJN1dQmfuZZ21jAIgJzWxTyTKYZbByFe2vhDml5tfTyKywc5vrZ4+atwc27U="}],"size":6644,"noattachment":false,"key":"/modify-babel-preset/-/modify-babel-preset-3.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/modify-babel-preset-3.2.0.tgz_1476467569249_0.3782278657890856"},"directories":{},"readme":"\n# modify-babel-preset\n\n[![npm](https://img.shields.io/npm/v/modify-babel-preset.svg)](http://npm.im/modify-babel-preset)\n[![npm](https://img.shields.io/npm/dm/modify-babel-preset.svg)](http://npm.im/modify-babel-preset)\n[![travis](https://travis-ci.org/developit/modify-babel-preset.svg?branch=master)](https://travis-ci.org/developit/modify-babel-preset)\n\n\nCreate a modified babel preset based on an an existing preset.\n\n> Works best with `npm 3`.\n\n\n```sh\nnpm i -S modify-babel-preset\n```\n\n\n---\n\n\n- [API](#api)\n\t- [Add/Update Plugins](#addupdate-plugins)\n\t- [Remove Plugins](#remove-plugins)\n- [Example](#example)\n\n\n  ---\n\n\n## API\n\nA single function that takes an existing preset name and a mapping of plugin modifications to apply to that preset.  _Make sure you have the preset and any added plugins installed as dependencies._\n\n```js\nnewPreset = modifyBabelPreset(\n\t'existing-preset-name',\n\t{\n\t\t'plugin-name': false,  // remove\n\t\t'other-plugin': true,  // add\n\t\t'foo': { loose:true }  // add + config\n\t}\n);\n```\n\n> Modification keys are babel plugin names _(you can exclude the `babel-plugin-` prefix)._\n\n\n### Add/Update Plugins\n\nTo add a plugin, pass `true`, or a configuration object:\n\n```js\n{\n\t// just add a plugin without config:\n\t'plugin-name': true,\n\n\t// add a plugin and set its config\n\t'other-plugin': { loose:true }\n}\n```\n\n> **Note:** adding a plugin that is already provided by the preset just overwrites its configuration.\n\n\n### Remove Plugins\n\nTo remove a plugin, pass `false`:\n\n```js\n{\n\t'plugin-name': false\n}\n```\n\n\n---\n\n\n## Example\n\nHere's a simple preset. Just this `index.js` and a package.json pointing to it with the preset and plugin installed as dependencies.\n\n```js\nvar modifyBabelPreset = require('modify-babel-preset');\n\n// just export the cloned, modified preset config:\nmodule.exports = modifyBabelPreset('es2015', {\n\n\t// remove the typeof x==='symbol' transform:\n\t'transform-es2015-typeof-symbol': false,\n\n\t// add the JSX transform:\n\t'transform-react-jsx': true\n\n});\n```\n","publish_time":1476467570703,"_cnpm_publish_time":1476467570703,"dist-tags":{"beta":"2.0.1","latest":"3.2.1"}}