babel-load-config
Use exactly the same way babel-core does to load .babelrc
Last updated 10 years ago by rem .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install babel-load-config 
SYNC missed versions from official npm registry.

babel-load-config

NPM version NPM downloads Build Status donate

Install

# this requires babel-core as peer dependency
yarn add babel-load-config babel-core

Usage

const loadConfig = require('babel-load-config')
const buildConfigChain = require('babel-core/lib/transformation/file/options/build-config-chain')

const config = loadConfig(process.cwd(), buildConfigChain)
//=> {loc: '/User/name/dir/.babelrc', options: {presets: []}}

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

babel-load-config © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @rem_rin_rin

Current Tags

  • 1.0.0                                ...           latest (10 years ago)

2 Versions

  • 1.0.0                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 9
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 1
Last Month 2
Dependencies (0)
None
Dev Dependencies (6)
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE