Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akameco/read-babelrc-up
Read the closet .babelrc file
https://github.com/akameco/read-babelrc-up
babel babelrc find-up json
Last synced: about 2 months ago
JSON representation
Read the closet .babelrc file
- Host: GitHub
- URL: https://github.com/akameco/read-babelrc-up
- Owner: akameco
- License: mit
- Created: 2017-04-21T00:23:53.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:15:02.000Z (about 2 years ago)
- Last Synced: 2024-04-14T05:08:44.510Z (9 months ago)
- Topics: babel, babelrc, find-up, json
- Language: JavaScript
- Homepage:
- Size: 1.19 MB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 14
-
Metadata Files:
- Readme: readme.md
- License: license
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# read-babelrc-up
[![Build Status](https://travis-ci.org/akameco/read-babelrc-up.svg?branch=master)](https://travis-ci.org/akameco/read-babelrc-up)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)> Read the closet [Babel configuration file](https://babeljs.io/docs/en/config-files) or `babel` in package.json.
## Install
```
$ npm install --save read-babelrc-up
```## Usage
```js
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](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories
## Contributors
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
akameco
💻 📖 ⚠️ 🚇
Jiyoon Jang
💻 ⚠️
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
## License
MIT © [akameco](http://akameco.github.io)