import-local

WebJar for import-local

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

import-local
Last Version

Last Version

3.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

import-local
WebJar for import-local
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

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

Download import-local

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : pkg-dir jar [4.2.0,5)
org.webjars.npm : resolve-cwd jar [3.0.0,4)

Project Modules

There are no modules declared in this project.

import-local Build Status

Let a globally installed package use a locally installed version of itself if available

Useful for CLI tools that want to defer to the user's locally installed version when available, but still work if it's not installed locally. For example, AVA and XO uses this method.

Install

$ npm install import-local

Usage

const importLocal = require('import-local');

if (importLocal(__filename)) {
	console.log('Using local version of this package');
} else {
	// Code for both global and local version here…
}

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Versions

Version
3.0.2
2.0.0
1.0.0
0.1.1