{"_id":"@antoniel/find-babel-config","name":"@antoniel/find-babel-config","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@antoniel/find-babel-config","version":"3.0.0","main":"lib/index.js","description":"Find the closest babel config based on a directory","repository":{"type":"git","url":"git+https://github.com/tleunen/find-babel-config.git"},"author":{"name":"Tommy Leunen","email":"tommy.leunen@gmail.com","url":"http://tommyleunen.com"},"license":"MIT","keywords":["babel","config","loader","finder","babelrc"],"dependencies":{"json5":"^2.1.1","path-exists":"^4.0.0"},"devDependencies":{"@babel/cli":"^7.7.5","@babel/preset-env":"^7.7.6","babel-jest":"^24.9.0","eslint":"^6.7.2","eslint-config-airbnb-base":"^14.0.0","eslint-plugin-import":"^2.19.1","jest":"^24.9.0","standard-version":"^7.0.1"},"scripts":{"lint":"eslint src test","test:coverage":"jest --coverage","test:watch":"jest --watch","test":"jest","compile":"babel src --out-dir lib","prepublish":"npm run compile","release":"standard-version"},"jest":{"testRegex":"/test/.*\\.test\\.js$","collectCoverageFrom":["src/**/*.js"]},"greenkeeper":{"ignore":["eslint","eslint-plugin-import","babel-jest"]},"gitHead":"8f30456eff55da3e976a610ec29f74ba183d97b6","bugs":{"url":"https://github.com/tleunen/find-babel-config/issues"},"homepage":"https://github.com/tleunen/find-babel-config#readme","_id":"@antoniel/find-babel-config@3.0.0","_nodeVersion":"14.18.1","_npmVersion":"9.1.2","dist":{"integrity":"sha512-MVkeXnIoAzMYoe6meLpuZeTzWcHd5VIYyrWsWRz4aIql7vL6FoktWbIwmUXuZYWfEx8Dt7KF0wwz+F66mNy+Jw==","shasum":"0a88b876431809c0d2633a35f4001133cdfecc09","tarball":"https://registry.npmjs.org/@antoniel/find-babel-config/-/find-babel-config-3.0.0.tgz","fileCount":8,"unpackedSize":15307,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEPtN2tP/773Yko6dLJvmb8sf/dlbJqeo4jljsl8HPpwIhAN+v8Ztkxk8+UHXo4Uxx8XT2ynlcddvCYi9/fnlFchv6"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj8YoLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+wg/9HP9ggQM6NXBEsA46C/tsDMiAPbxWAn90+ictJ2JK6pVjAmBX\r\n8bZVfBQRpwd1Y+GnqqZ+tC95wMz+bRdqMi8ihQgtPOZNARVwD9J8/T1Q8eDa\r\nrymL7BMoP9nBzgBCrcaZl20xQ07JP8fpHeVdTFX3/km5o1tYv+vhX4jEE2+U\r\nu7a3YKQGBQHMVGYZEkYSTnp2kEvDGar/h9ghNRiBBmrJ2Dwtl/AHEoa5W9S2\r\nQBVfJVh5jKD4NJrMQjd36bWh74zvxGInxg1PUz8E31u15xs9LdvF5kCP/jtz\r\n17IdECEFJIi//Py5JVxkrDtEGz6ZpdH2KJceDHCLGgdSYX+MN7XffZfetZGU\r\n5vI2TuI9DNZM18sr0XHByyXbRpobBWSRDnZrRvL9GjzXbaYpDTMUDCFtIZyL\r\nUrjDc3AF5DRb+nTmM71ByhSHCwWTcjfsUU0CQqvTou+xZvoyMjUlWR5a+Ew3\r\nnZ/93jqcNwDSDOTCO2eR7BUiQrAp41V+PhrlzlWjHAYxjTRZxwQOFDQP2coP\r\n6cv0hezpuyndZ9EhSGoDPGgyXBXzStl1vBPNrY1fUGM4sIGMUCHDUMLM9eLV\r\nhVs0iumrGHlwPAl50L6w09cAZKqYvC5b8B92ZPuUd+HLfroVc5GmQaE2oEze\r\nUr1Q1/3GBohc5rqEWq2Umu2Uomy1Ljj+dSg=\r\n=9Kxc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"antoniel","email":"antoniel2210@gmail.com"},"directories":{},"maintainers":[{"name":"antoniel","email":"antoniel2210@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/find-babel-config_3.0.0_1676773898951_0.4589101288181192"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-19T02:31:38.885Z","3.0.0":"2023-02-19T02:31:39.121Z","modified":"2023-02-19T02:31:39.356Z"},"maintainers":[{"name":"antoniel","email":"antoniel2210@gmail.com"}],"description":"Find the closest babel config based on a directory","homepage":"https://github.com/tleunen/find-babel-config#readme","keywords":["babel","config","loader","finder","babelrc"],"repository":{"type":"git","url":"git+https://github.com/tleunen/find-babel-config.git"},"author":{"name":"Tommy Leunen","email":"tommy.leunen@gmail.com","url":"http://tommyleunen.com"},"bugs":{"url":"https://github.com/tleunen/find-babel-config/issues"},"license":"MIT","readme":"# find-babel-config\n[![npm][npm-version-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coverage Status][coverage-image]][coverage-url]\n\nHelper function to retrieve the closest Babel configuration from a specific directory.\n\n## Installation\n\n```sh\nnpm install --save find-babel-config\n```\n\n## Usage\n\n### Async\n\n```js\n// directory can be an absolute or relative path\n// If it's a relative path, it is relative to the current working directory (process.cwd())\nconst directory = 'src';\nfindBabelConfig(directory).then(({ file, config }) => {\n    if (file) {\n        // file is the file in which the config is found\n        console.log(file);\n        // config is a JS plain object with the babel config\n        console.log(config);\n    }\n});\n```\n\n### Sync\n\n```js\n// directory can be an absolute or relative path\n// If it's a relative path, it is relative to the current working directory (process.cwd())\nconst directory = 'src';\nconst { file, config } = findBabelConfig.sync(directory);\n// if file === null, the config wasn't found. (Also config === null)\nif (file) {\n    // file is the file in which the config is found\n    console.log(file);\n    // config is a JS plain object with the babel config\n    console.log(config);\n}\n```\n\nA second parameter can be given to `findBabelConfig`, it specifies the `depth` of search. By default, this value is `Infinity` but you can set the value you want: `findBabelConfig('src', 10)`.\n\n## License\n\nMIT, see [LICENSE.md](/LICENSE.md) for details.\n\n[ci-image]: https://circleci.com/gh/tleunen/find-babel-config.svg?style=shield\n[ci-url]: https://circleci.com/gh/tleunen/find-babel-config\n[coverage-image]: https://codecov.io/gh/tleunen/find-babel-config/branch/master/graph/badge.svg\n[coverage-url]: https://codecov.io/gh/tleunen/find-babel-config\n[npm-version-image]: https://img.shields.io/npm/v/find-babel-config.svg\n[npm-url]: https://www.npmjs.com/package/find-babel-config\n","readmeFilename":"README.md"}