|
|
@ -1,10 +1,10 @@ |
|
|
|
# requireable |
|
|
|
# requirable |
|
|
|
|
|
|
|
> Enables a module to require itself by name |
|
|
|
|
|
|
|
[](https://travis-ci.org/lukechilds/requireable) |
|
|
|
[](https://coveralls.io/github/lukechilds/requireable?branch=master) |
|
|
|
[](https://www.npmjs.com/package/requireable) |
|
|
|
[](https://travis-ci.org/lukechilds/requirable) |
|
|
|
[](https://coveralls.io/github/lukechilds/requirable?branch=master) |
|
|
|
[](https://www.npmjs.com/package/requirable) |
|
|
|
|
|
|
|
Mocks the require command to include the current package when the `name` from the current `package.json` is required. |
|
|
|
|
|
|
@ -13,7 +13,7 @@ Uses `process.cwd()` to find the current `package.json` so this is only meant to |
|
|
|
## Install |
|
|
|
|
|
|
|
```shell |
|
|
|
npm install --save-dev requireable |
|
|
|
npm install --save-dev requirable |
|
|
|
``` |
|
|
|
|
|
|
|
## Usage |
|
|
@ -32,7 +32,7 @@ Some tests runners such as [AVA](https://github.com/avajs/ava) can require packa |
|
|
|
```json |
|
|
|
"ava": { |
|
|
|
"require": [ |
|
|
|
"requireable" |
|
|
|
"requirable" |
|
|
|
] |
|
|
|
}, |
|
|
|
``` |
|
|
@ -55,7 +55,7 @@ Some tests runners such as [AVA](https://github.com/avajs/ava) can require packa |
|
|
|
|
|
|
|
## API |
|
|
|
|
|
|
|
### require('requireable') |
|
|
|
### require('requirable') |
|
|
|
|
|
|
|
Patches the require function to be able to require the current module by name. |
|
|
|
|
|
|
|