0.0.2 • Published 8 years ago

version-update v0.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

version-update

for npm module update

Build Status Coverage Status

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