Programmatically install npm packages.
This is used by webpack-proxy, here's a preview:
yarn add install-packagesconst install = require('install-packages')
install({
packages: ['webpack', 'mocha']
})
//=> PromiseType: string[]
You can omit this to install dependencies from package.json.
Type: string
Default: process.cwd()
The directory to install packages.
Type: boolean
Default: true
Install peer dependencies for corresponding dependency.
Type: (name: string, version: string) => boolean
A function to filter peerDependencies, return true to install it, false otherwise.
Type: boolean
Default: false
Install as dev dependencies.
Type: string
Possible values: npm yarn
By default we automatically detect package manager.
Determine package manager for specifc directory.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D