version-update
v0.0.2
Published
for npm module update
Downloads
3
Readme
version-update
for npm module update
usage
- parameter:
options = {}
options = {
moduleName, // module name to update
version,// optional, module version you want to update
path,//module path, if is not module path, ergodic sub dir to update module path
}
- return:
- Object: if input path is module path, return object
{
status, // 0 is success, -1 is failed
path,
moduleName,
oldVersion, // only success have this property
newVersion // only success have this property
}
- Array: if input path not module path. will update sub file recursively, return array
[
obj, // object is the same as the above
]
- example
const updateMain = require('version-update');
updateMain({
moduleName: 'lodash',
version: '4.0.0',
path: path
}).then((data) => {
// data
};
test
npm test
test coverage
npm run cov