Skip to content

Commit

Permalink
Breaking: Remove the load() method (ref #10)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jan 3, 2019
1 parent e944fe7 commit fcd1d2b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
9 changes: 0 additions & 9 deletions README.md
Expand Up @@ -32,16 +32,7 @@ rechoir.registerFor('path/to/file.coffee');
require('file.coffee');
```

### load (filepath)
Automatically call `requireFor`, then require the requested file and return the result.

### interpret
The underlying [interpret] module.

#### Usage
```js
var rechoir = require('rechoir');
rechoir.load('file.coffee');
```

[interpret]: https://github.com/tkellen/node-interpret
5 changes: 0 additions & 5 deletions index.js
Expand Up @@ -52,9 +52,4 @@ exports.registerFor = function (filepath, cwd) {
}
};

exports.load = function (filepath) {
exports.registerFor(filepath);
return require(path.resolve(filepath));
};

exports.interpret = interpret;
7 changes: 0 additions & 7 deletions test/index.js
Expand Up @@ -94,13 +94,6 @@ describe('registerFor', function () {
});
});

describe('load', function () {
it('should automatically register a loader and require', function () {
delete require.extensions['.coffee'];
expect(rechoir.load('./test/fixtures/test.json')).to.deep.equal(expected);
});
});

describe('interpret', function () {
it('should expose the underlying interpret object', function () {
expect(rechoir.interpret).to.deep.equal(require('interpret'));
Expand Down

0 comments on commit fcd1d2b

Please sign in to comment.