find-babel-config

WebJar for find-babel-config

Лицензия

Лицензия

MIT
Категории

Категории

config Библиотеки уровня приложения Configuration
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

find-babel-config
Последняя версия

Последняя версия

1.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

find-babel-config
WebJar for find-babel-config
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/tleunen/find-babel-config

Скачать find-babel-config

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/find-babel-config/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>find-babel-config</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/find-babel-config/
implementation 'org.webjars.npm:find-babel-config:1.2.0'
// https://jarcasting.com/artifacts/org.webjars.npm/find-babel-config/
implementation ("org.webjars.npm:find-babel-config:1.2.0")
'org.webjars.npm:find-babel-config:jar:1.2.0'
<dependency org="org.webjars.npm" name="find-babel-config" rev="1.2.0">
  <artifact name="find-babel-config" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='find-babel-config', version='1.2.0')
)
libraryDependencies += "org.webjars.npm" % "find-babel-config" % "1.2.0"
[org.webjars.npm/find-babel-config "1.2.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : json5 jar [0.5.1,0.6)
org.webjars.npm : path-exists jar [3.0.0,4)

Модули Проекта

Данный проект не имеет модулей.

find-babel-config

npm Build Status Coverage Status

Helper function to retrieve the closest Babel configuration from a specific directory.

Installation

npm install --save find-babel-config

Usage

Async

// 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
        console.log(config);
    }
});

Sync

// 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';
const { file, config } = findBabelConfig.sync(directory);
// if file === null, the config wasn't found. (Also config === null)
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
    console.log(config);
}

A second parameter can be given to findBabelConfig, it specifies the depth of search. By default, this value is Infinity but you can set the value you want: findBabelConfig('src', 10).

License

MIT, see LICENSE.md for details.

Версии библиотеки

Версия
1.2.0
1.1.0