Read the closet Babel configuration file or
babel
in package.json.
$ npm install --save read-babelrc-up
const readBabelrcUp = require('read-babelrc-up')
readBabelrcUp().then(result => {
console.log(result)
/*
{
babel:
{ presets: [ 'es2015', 'react' ],
plugins: [ 'transform-class-properties' ] },
path: '/Users/akameco/src/my-babel-app/.babelrc'
}
*/
})
Returns a Promise
for the result object.
Return the result object.
Type: string
Default: .
Directory to start looking for .babelrc file.
- find-up - Find a file by walking up parent directories
Thanks goes to these wonderful people (emoji key):
akameco 💻 📖 |
Jiyoon Jang 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT © akameco