require-main-filename

WebJar for require-main-filename

License

License

ISC
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

require-main-filename
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

require-main-filename
WebJar for require-main-filename
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/yargs/require-main-filename

Download require-main-filename

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

require-main-filename

Build Status Coverage Status NPM version

require.main.filename is great for figuring out the entry point for the current application. This can be combined with a module like pkg-conf to, as if by magic, load top-level configuration.

Unfortunately, require.main.filename sometimes fails when an application is executed with an alternative process manager, e.g., iisnode.

require-main-filename is a shim that addresses this problem.

Usage

var main = require('require-main-filename')()
// use main as an alternative to require.main.filename.

License

ISC

org.webjars.npm

Versions

Version
2.0.0
1.0.1