Methods
(static) install(opts) → {object}
Installs mock package into node_modules & updates the corresponding package.json file
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object
|
|
Returns:
- Type:
-
object
JS object package.json
Example
mock.install({
package: { name: 'TEST_NAME', version: 'TEST_VERSION' },
nodeModulesDir: '/path/to/target/node_modules',
targetPackage: '/path/to/target/package.json',
isDev: true
})
(static) remove(opts)
remove mock package
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object
|
|