Temporary installs a npm package and automatically cleans up the resources afterwards.
npm install npm-install-tmp --save
import {use} from 'npm-install-tmp';
// Pass the name of the package you want to include (e.g. example or example@latest)
use('example')
.then(example => {
// do what ever you want
});
After the process exited all the resource are cleaned up automatically.
npm install
npm test
- @types/node: TypeScript definitions for Node.js
- npm: a package manager for JavaScript
- tmp: Temporary file and directory creator
- rimraf: A deep deletion module for node (like
rm -rf
) - tslint: An extensible static analysis linter for the TypeScript language
- typescript: TypeScript is a language for application scale JavaScript development
MIT