You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# requireable
|
|
|
|
|
|
|
|
> Enables a module to require itself
|
|
|
|
|
|
|
|
[![Build Status](https://travis-ci.org/lukechilds/requireable.svg?branch=master)](https://travis-ci.org/lukechilds/requireable)
|
|
|
|
[![Coverage Status](https://coveralls.io/repos/github/lukechilds/requireable/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/requireable?branch=master)
|
|
|
|
[![npm](https://img.shields.io/npm/v/requireable.svg)](https://www.npmjs.com/package/requireable)
|
|
|
|
|
|
|
|
Mocks the require command to include the current package when the the `name` from the current packages `package.json` is required.
|
|
|
|
|
|
|
|
Especially useful in tests if you want to require the package you're testing by name rather than relative paths.
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
```shell
|
|
|
|
npm install --save-dev requireable
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```js
|
|
|
|
require('requirable');
|
|
|
|
```
|
|
|
|
|
|
|
|
That's it! You can now do `require('package-name')`.
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
MIT © Luke Childs
|