--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
23
node_modules/require-dot-file/README.md
generated
vendored
Executable file
23
node_modules/require-dot-file/README.md
generated
vendored
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
## Install
|
||||
|
||||
```javascript
|
||||
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](http://askubuntu.com/questions/94780/what-are-dot-files) to allow users to configure your project that they can include in their project root.
|
||||
|
||||
```javascript
|
||||
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');
|
||||
```
|
||||
Loading…
Reference in a new issue