{"_id":"babel-plugin-conditional-compile","_rev":"8-1ecea40451900b0373173082217b2ea9","name":"babel-plugin-conditional-compile","description":"babel plugin for conditional compile","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.2":{"name":"babel-plugin-conditional-compile","version":"0.0.2","description":"babel plugin for conditional compile","main":"dist/index.js","scripts":{"test":"node temp/test.js","prepare":"gulp build:test"},"repository":{"type":"git","url":"git+https://github.com/brianZeng/babel-plugin-conditional-compile.git"},"keywords":["babel","compile","bebel-plugin"],"author":{"name":"brianZeng"},"license":"ISC","bugs":{"url":"https://github.com/brianZeng/babel-plugin-conditional-compile/issues"},"homepage":"https://github.com/brianZeng/babel-plugin-conditional-compile#readme","devDependencies":{"babel-core":"^6.3.26","babelify":"^7.2.0","gulp":"^3.9.0","gulp-babel":"^6.1.1","gulp-watchify":"^0.5.0"},"gitHead":"3caecb69fca7975fafa4b8753f4c3dea6c2f63d0","_id":"babel-plugin-conditional-compile@0.0.2","_shasum":"afeb46f7e4ed0cef02b2db7e758e5962bcda90f3","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"brian_z","email":"121047959@qq.com"},"dist":{"shasum":"afeb46f7e4ed0cef02b2db7e758e5962bcda90f3","tarball":"https://registry.npmjs.org/babel-plugin-conditional-compile/-/babel-plugin-conditional-compile-0.0.2.tgz","integrity":"sha512-pmmkO/mtrRtWdtr3g0hZ4R6XJwiNiCQ3fifxn4ys+NycZyATzjLyedtOWxCu5DBFbKjuQsBf+ZoM+zjoYqKRpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvaCrF1sHU4PEIVbqzywR8GtWaNMX/zYa39Bsm0oiUGgIhAMYZ630W6A8bTDzC9Y8r0KN3pxkLPUWENuEB/pjmJjDe"}]},"maintainers":[{"name":"brian_z","email":"121047959@qq.com"}]},"0.0.3":{"name":"babel-plugin-conditional-compile","version":"0.0.3","description":"babel plugin for conditional compile","main":"dist/index.js","scripts":{"test":"node temp/test.js","prepare":"gulp build:test"},"repository":{"type":"git","url":"git+https://github.com/brianZeng/babel-plugin-conditional-compile.git"},"keywords":["babel","compile","bebel-plugin"],"author":{"name":"brianZeng"},"license":"ISC","bugs":{"url":"https://github.com/brianZeng/babel-plugin-conditional-compile/issues"},"homepage":"https://github.com/brianZeng/babel-plugin-conditional-compile#readme","devDependencies":{"babel-core":"^6.3.26","babelify":"^7.2.0","gulp":"^3.9.0","gulp-babel":"^6.1.1","gulp-watchify":"^0.5.0"},"gitHead":"17b8625469f5581b95cce9329d2ab2bd87453ee8","_id":"babel-plugin-conditional-compile@0.0.3","_shasum":"f8697b2d30c1318972490a1a56a1c303890bc32d","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"brian_z","email":"121047959@qq.com"},"dist":{"shasum":"f8697b2d30c1318972490a1a56a1c303890bc32d","tarball":"https://registry.npmjs.org/babel-plugin-conditional-compile/-/babel-plugin-conditional-compile-0.0.3.tgz","integrity":"sha512-PVTrPKgvhwLyZ08TAzAXrA93qe8fHyMq4NioKgskEdh72CQY840sqR9nf0a6E4wFXNltnjOQBl2tLmCrrFHfAQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDS70w5MS4v2xxcIexvzNSbTT0UIYMHvGx2ppbMeCDVCgIgCPFMqSjcgKHCjbU1uBxX8EF9UpcDlXGENiFkmuZ428w="}]},"maintainers":[{"name":"brian_z","email":"121047959@qq.com"}]},"0.0.4":{"name":"babel-plugin-conditional-compile","version":"0.0.4","description":"babel plugin for conditional compile","main":"dist/index.js","scripts":{"test":"node temp/test.js","prepare":"gulp build:test"},"repository":{"type":"git","url":"git+https://github.com/brianZeng/babel-plugin-conditional-compile.git"},"keywords":["babel","compile","bebel-plugin"],"author":{"name":"brianZeng"},"license":"ISC","bugs":{"url":"https://github.com/brianZeng/babel-plugin-conditional-compile/issues"},"homepage":"https://github.com/brianZeng/babel-plugin-conditional-compile#readme","devDependencies":{"babel-core":"^6.3.26","babelify":"^7.2.0","gulp":"^3.9.0","gulp-babel":"^6.1.1","gulp-watchify":"^0.5.0"},"gitHead":"1eeb34562c726e489c8638d596ce7bce2244d9a8","_id":"babel-plugin-conditional-compile@0.0.4","_shasum":"1c4772df843dad8a3134f85faed477617babc8da","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"brian_z","email":"121047959@qq.com"},"dist":{"shasum":"1c4772df843dad8a3134f85faed477617babc8da","tarball":"https://registry.npmjs.org/babel-plugin-conditional-compile/-/babel-plugin-conditional-compile-0.0.4.tgz","integrity":"sha512-JCuiZUNbOVOaF3ugpR8q7uy4ZVRfCJG91Yusx5YNN06ydEsd/TazOAyiXjAtLsG2R29EXIiZGzh8spvLtzdoMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHjEi9aXdqKt+tzujGbLWvsRAMNjsLoPkTu5M65F0gcwIhALb5zTq8k35X4igFBGWelhIu+ovrFLdGVcHfH5LV23WL"}]},"maintainers":[{"name":"brian_z","email":"121047959@qq.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/babel-plugin-conditional-compile-0.0.4.tgz_1456301568142_0.5520978942513466"}},"0.0.5":{"name":"babel-plugin-conditional-compile","version":"0.0.5","description":"babel plugin for conditional compile","main":"dist/index.js","scripts":{"test":"node temp/test.js","prepare":"gulp build:test"},"repository":{"type":"git","url":"git+https://github.com/brianZeng/babel-plugin-conditional-compile.git"},"keywords":["babel","compile","bebel-plugin"],"author":{"name":"brianZeng"},"license":"ISC","bugs":{"url":"https://github.com/brianZeng/babel-plugin-conditional-compile/issues"},"homepage":"https://github.com/brianZeng/babel-plugin-conditional-compile#readme","devDependencies":{"babel-core":"^6.11.4","babel-preset-stage-0":"^6.5.0","babelify":"^7.2.0","gulp":"^3.9.0","gulp-babel":"^6.1.1","gulp-watchify":"^0.5.0"},"gitHead":"4c2ca8c724ae61bc66136ace5c55eacb4b627c68","_id":"babel-plugin-conditional-compile@0.0.5","_shasum":"66d99537e055261d96de2c9ec4cc66ed2d3c287d","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.3.0","_npmUser":{"name":"brian_z","email":"121047959@qq.com"},"dist":{"shasum":"66d99537e055261d96de2c9ec4cc66ed2d3c287d","tarball":"https://registry.npmjs.org/babel-plugin-conditional-compile/-/babel-plugin-conditional-compile-0.0.5.tgz","integrity":"sha512-K9t3XHwlLiPvpxGweJd8ZGX61UyEEgmaVvmaFh6zcsgqtOgRRo2h8JwTfjYwWpVXObZXo1eDquRogUyn5+VztQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRbLg+udUxOD9o6hFU4RJL4oLzRjmp1wJCJMWjkoa2MgIgLft8g4NyQwUB2LRYxyHMEhUydCTmuIauimwnvrcXTWU="}]},"maintainers":[{"name":"brian_z","email":"121047959@qq.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/babel-plugin-conditional-compile-0.0.5.tgz_1469005349428_0.9819452047813684"}}},"readme":"#babel-plugin-conditional-compile\nEvaluate If statement and remove unavailable code\n## Conditional Compile\nYou may rewrite code like\n```javascript\nif(IS_DEV){\n  console.log('track infomation')\n}\nvar foo;\nif(CODE_FOR_IE){\n  foo=1;\n}\nelse if(CODE_FOR_CHROME){\n  foo=2;\n}\n```\nBut you don't want to log until it is published and\nif you know the code target,you can just kick the redundant when published.\nThe code to publish for chrome will be like.\n```javascript\n\nvar foo;\n\nfoo=2;\n\n```\n\n## Installation\n\n```sh\n$ npm install babel-plugin-conditional-compile --save-dev\n```\n\n## Usage\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n  plugins: [\"conditional-compile\",{\n    define:{\n      IS_DEV:false,\n      CODE_FOR_IE:true\n    }\n  }]\n});\n```\nThe example code above will become\n\n```javascript\n\nconsole.log('track infomation')\n\nvar foo;\n\nfoo=1;\n\n```\n\n## Options\nThe available options are\n```\n{\n  define:{\n    APP_VERSION:'1.0.0',\n    IS_DEV:true\n  },\n  dropDebugger:false\n}\n```\n* any variable same with key name in define object will be replace by its value\n* when dropDebugger set true, the `debugger;` statement will be removed\n","maintainers":[{"name":"brian_z","email":"121047959@qq.com"}],"time":{"modified":"2022-06-13T04:00:49.799Z","created":"2015-12-30T10:24:58.113Z","0.0.1":"2015-12-30T10:24:58.113Z","0.0.2":"2016-01-01T07:26:13.629Z","0.0.3":"2016-01-07T11:47:00.806Z","0.0.4":"2016-02-24T08:12:48.790Z","0.0.5":"2016-07-20T09:02:31.768Z"},"homepage":"https://github.com/brianZeng/babel-plugin-conditional-compile#readme","keywords":["babel","compile","bebel-plugin"],"repository":{"type":"git","url":"git+https://github.com/brianZeng/babel-plugin-conditional-compile.git"},"author":{"name":"brianZeng"},"bugs":{"url":"https://github.com/brianZeng/babel-plugin-conditional-compile/issues"},"license":"ISC","readmeFilename":"readme.md"}