shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
addPackageDependencies
Type:Function
Status:beta
Since:1.0.0
Platform:node
@blackbyte.sugar.node.package
This function allows you to add some dependencies to a package.json file
Params
- deps*-Object
The dependencies to add
- settings{}TAddPackageDependenciesSettings
Some settings to configure your process
Return
- -Promise<any>
A promise with the package.json content as object
Example
import { addPackageDependencies } from '@blackbyte/sugar/package`;
addPackageDependencies('lodash');Settings
- cwdprocess.cwd()String
The directory in which you want to start the research
- devfalseBoolean
Specify if you want to add the dependencies to the devDependencies
- globalfalseBoolean
Specify if you want to add the dependencies to the global package.json
- installfalseBoolean
Specify if you want to install the dependencies after adding them
- overridefalseBoolean
Specify if you want to override the dependencies if they already exists
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space