{"name":"babel-plugin-module-alias","version":"0.1.2","main":"lib/index.js","description":"Babel plugin to rewrite the path in require() and ES6 import","repository":{"type":"git","url":"git+https://github.com/tleunen/babel-plugin-module-alias.git"},"author":{"name":"Tommy Leunen","email":"tommy.leunen@gmail.com","url":"http://tommyleunen.com"},"license":"MIT","dependencies":{"babel-core":"^5.8.22","glob":"^5.0.14","lodash":"^3.10.1"},"scripts":{"build":"babel-plugin build","push":"babel-plugin publish","test":"babel-plugin test"},"keywords":["babel","babel-plugin","module","alias","rewrite","rename"],"gitHead":"12319623034cc45e0cfbcb7ddaa8e8b1b8ba6c05","bugs":{"url":"https://github.com/tleunen/babel-plugin-module-alias/issues"},"homepage":"https://github.com/tleunen/babel-plugin-module-alias#readme","_id":"babel-plugin-module-alias@0.1.2","_shasum":"4fadbf2839db68e6efd4d9bcdd475ad54a25a118","_from":".","_npmVersion":"2.13.4","_nodeVersion":"0.12.5","_npmUser":{"name":"tleunen","email":"tommy.leunen@gmail.com"},"dist":{"shasum":"4fadbf2839db68e6efd4d9bcdd475ad54a25a118","tarball":"http://registry-npm.ywwl.com/babel-plugin-module-alias/download/babel-plugin-module-alias-0.1.2.tgz","integrity":"sha512-GDMjGHQRcGeaAtBLBi6Kd7wtPslCXT+yA/erRqyW/8pHAwfwYe49AG0uDbTC2Q8b70FP9ASnLNoDraZvJoS5Gg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDD0ihRYM7vUvONOB91u+yEt2aId/GFRYNbn2FhG1TO+wIgRGEIIszzSGvoLpj4qnLTeGOco/bA+fnZgTNoRqpq2I0="}],"size":3570,"noattachment":false,"key":"/babel-plugin-module-alias/-/babel-plugin-module-alias-0.1.2.tgz"},"maintainers":[{"name":"tleunen","email":"tommy.leunen@gmail.com"}],"deprecated":"WARNING: This project has been renamed to babel-plugin-module-resolver. Install babel-plugin-module-resolver for new features","directories":{},"readme":"# babel-plugin-module-alias [![Build Status][ci-image]][ci-url] [![Coverage Status][coverage-image]][coverage-url]\n\nA [babel](http://babeljs.io) plugin to rewrite (map, alias, resolve) directories as different directories during the Babel process. It's particularly useful when you have files you don't want to use with relative paths (especially in big projects).\n\n## Description\n\nInstead of using relative paths in your project, you'll be able to use an alias. Here an simple example:\n```js\n// Instead of using this;\nimport MyUtilFn from '../../../../utils/MyUtilFn';\n// Use that:\nimport MyUtilFn from 'utils/MyUtilFn';\n```\nWith this plugin, you'll be able to map files or directories to the path you want.\n\n_Note:_ It also work for `require()`.\n\n_Note 2:_ You can use the `npm:` prefix in your plugin configuration to map a node module.\n\n\n## Usage\n\nInstall the plugin\n\n```\n$ npm install --save-dev babel babel-plugin-module-alias\n```\n\nSpecify the plugin in your `.babelrc` with the custom mapping.\n```json\n{\n  \"plugins\": [\n    [\"module-alias\", [\n      { \"src\": \"./src/utils\", \"expose\": \"utils\" },\n      { \"src\": \"./src/components\", \"expose\": \"awesome/components\" },\n      { \"src\": \"npm:lodash\", \"expose\": \"underscore\" }\n    ]]\n  ]\n}\n```\n\nIf you're using [eslint-plugin-import][eslint-plugin-import], you should use [eslint-import-resolver-babel-module-alias][resolver-module-alias] to avoid having false errors.\n\n## License\n\nMIT, see [LICENSE.md](/LICENSE.md) for details.\n\n\n[ci-image]: https://circleci.com/gh/tleunen/babel-plugin-module-alias.svg?style=shield\n[ci-url]: https://circleci.com/gh/tleunen/babel-plugin-module-alias\n[coverage-image]: https://codecov.io/gh/tleunen/babel-plugin-module-alias/branch/master/graph/badge.svg\n[coverage-url]: https://codecov.io/gh/tleunen/babel-plugin-module-alias\n[resolver-module-alias]: https://github.com/tleunen/eslint-import-resolver-babel-module-alias\n[eslint-plugin-import]: https://github.com/benmosher/eslint-plugin-import\n","publish_time":1439736448185,"_cnpm_publish_time":1439736448185,"dist-tags":{"latest":"1.6.0"}}