【文件属性】:
文件名称:find-babel-config:根据目录查找最接近的babel配置
文件大小:105KB
文件格式:ZIP
更新时间:2021-01-31 03:19:06
config babel find BabelJavaScript
find-babel-config
Helper函数可从特定目录检索最接近的Babel配置。
安装
npm install --save find-babel-config
用法
异步
// directory can be an absolute or relative path
// If it's a relative path, it is relative to the current working directory (process.cwd())
const directory = 'src' ;
findBabelConfig ( directory ) . then ( ( { file , config } ) => {
if ( file ) {
// file is the file in which the config is found
console . log ( file ) ;
// config is a JS plain object with the babel config
【文件预览】:
find-babel-config-master
----.eslintrc(333B)
----.babelrc(124B)
----package.json(1KB)
----.github()
--------workflows()
----test()
--------data()
--------index.test.js(15KB)
----src()
--------index.js(5KB)
----.npmignore(33B)
----LICENSE.md(1KB)
----.gitignore(66B)
----CHANGELOG.md(2KB)
----README.md(2KB)
----yarn.lock(236KB)