import-cwd

WebJar for import-cwd

Лицензия

Лицензия

MIT
Группа

Группа

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

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

import-cwd
Последняя версия

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

3.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

import-cwd
WebJar for import-cwd
Ссылка на сайт

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

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

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

https://github.com/sindresorhus/import-cwd

Скачать import-cwd

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

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

Зависимости

compile (1)

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

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

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

import-cwd

Import a module like with require() but from the current working directory

Install

$ npm install import-cwd

Usage

const importCwd = require('import-cwd');

// Target module is at '/Users/sindresorhus/unicorn/foo.js'

console.log(__dirname);
//=> '/Users/sindresorhus/rainbow'

console.log(process.cwd());
//=> '/Users/sindresorhus/unicorn'

const foo = importCwd('./foo');

API

importCwd(moduleId)

Like require(), throws when the module can't be found.

importCwd.silent(moduleId)

Returns undefined instead of throwing when the module can't be found.

moduleId

Type: string

What you would use in require().

Related

  • import-from - Import a module from a given path
  • resolve-from - Resolve the path of a module from a given path
  • resolve-cwd - Resolve the path of a module from the current working directory
  • resolve-pkg - Resolve the path of a package regardless of it having an entry point
  • import-lazy - Import modules lazily
  • import-global - Import a globally installed module

License

MIT © Sindre Sorhus

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

Версия
3.0.0
2.1.0