require-dot-file

WebJar for require-dot-file

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

require-dot-file
Last Version

Last Version

0.4.0
Release Date

Release Date

Type

Type

jar
Description

Description

require-dot-file
WebJar for require-dot-file
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jlukic/require-dot-file

Download require-dot-file

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/require-dot-file/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>require-dot-file</artifactId>
    <version>0.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/require-dot-file/
implementation 'org.webjars.npm:require-dot-file:0.4.0'
// https://jarcasting.com/artifacts/org.webjars.npm/require-dot-file/
implementation ("org.webjars.npm:require-dot-file:0.4.0")
'org.webjars.npm:require-dot-file:jar:0.4.0'
<dependency org="org.webjars.npm" name="require-dot-file" rev="0.4.0">
  <artifact name="require-dot-file" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='require-dot-file', version='0.4.0')
)
libraryDependencies += "org.webjars.npm" % "require-dot-file" % "0.4.0"
[org.webjars.npm/require-dot-file "0.4.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.

Install

npm install require-dot-file

Usage

This is a simple module used for recursively searching across all parent folders for a file to require.

For example you may want to allow a user to include a dotfile to allow users to configure your project that they can include in their project root.

var
  requireDotFile = require('require-dot-file')
;

// searches for .myconfig in all parent dir recursively (including current dir)
var config = requireDotFile('.myconfig');

// searches for .myconfig file in /path/to/start and its parent dirs
var config = requireDotFile('.myconfig', '/path/to/start');

Versions

Version
0.4.0