pkg-up

WebJar for pkg-up

Лицензия

Лицензия

MIT
Группа

Группа

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

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

pkg-up
Последняя версия

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

3.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

pkg-up
WebJar for pkg-up
Ссылка на сайт

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

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

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

https://github.com/sindresorhus/pkg-up

Скачать pkg-up

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

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

Зависимости

compile (1)

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

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

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

pkg-up Build Status

Find the closest package.json file

Install

$ npm install pkg-up

Usage

/
└── Users
    └── sindresorhus
        └── foo
            ├── package.json
            └── bar
                ├── baz
                └── example.js
// example.js
const pkgUp = require('pkg-up');

(async () => {
	console.log(await pkgUp());
	//=> '/Users/sindresorhus/foo/package.json'
})();

API

pkgUp([options])

Returns a Promise<string> for the filepath, or Promise<null> if it couldn't be found.

pkgUp.sync([options])

Returns the filepath, or null if it couldn't be found.

options

Type: Object

cwd

Type: string
Default: process.cwd()

Directory to start from.

Related

  • read-pkg-up - Read the closest package.json file
  • pkg-dir - Find the root directory of an npm package
  • find-up - Find a file by walking up parent directories

License

MIT © Sindre Sorhus

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

Версия
3.1.0
2.0.0
1.0.0