https://github.com/strongloop/strong-cached-install
Speed up `npm install` in unit-tests by using a cache on subsequent runs.
https://github.com/strongloop/strong-cached-install
Last synced: 9 months ago
JSON representation
Speed up `npm install` in unit-tests by using a cache on subsequent runs.
- Host: GitHub
- URL: https://github.com/strongloop/strong-cached-install
- Owner: strongloop
- License: other
- Created: 2014-07-09T06:44:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-05-09T20:34:15.000Z (over 6 years ago)
- Last Synced: 2024-10-13T21:52:09.346Z (over 1 year ago)
- Language: JavaScript
- Size: 36.1 KB
- Stars: 3
- Watchers: 27
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# strong-cached-install [](https://travis-ci.org/strongloop/strong-cached-install)
[](https://npmjs.org/package/strong-cached-install.png)
## Overview
Strong-cached-install speeds up `npm install` in your tests by caching the
content of `node_modules` and using plain `cp -r` on subsequent runs.
## Installation
```sh
$ npm install strong-cached-install
```
## Usage
```js
var path = require('path');
var install = require('strong-cached-install');
describe('my yo generator', function() {
before(resetSandbox);
before(runGeneratorInSandbox);
before(function installDependencies(done) {
var appDir = SANDBOX;
var cacheDir = path.resolve(__dirname, '.pkgcache');
install(appDir, cacheDir, done);
}
// and the tests
});
```