read-babelrc-up
v1.1.0
Published
Read the closet Babel configuration file
Downloads
75,653
Maintainers
Readme
read-babelrc-up
Read the closet Babel configuration file or
babel
in package.json.
Install
$ npm install --save read-babelrc-up
Usage
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'
}
*/
})
API
readBabelrcUp([options])
Returns a Promise
for the result object.
readBabelrcUp.sync([options])
Return the result object.
options
cwd
Type: string
Default: .
Directory to start looking for .babelrc file.
Related
- find-up - Find a file by walking up parent directories
Contributors
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
License
MIT © akameco