1.0.2 • Published 9 years ago
yuan-auto-update v1.0.2
To detect and automatically update (if necessary) the latest version of specified module.
How To Use?
var yau = require('yuan-auto-update');
var ret = yau('yuan' /* module name */, {
// Specify the registry of npm.
registry: 'https://registry.npmjs.org/',
// Whether to install the module globally.
global: false,
// Specify the install path, only available when *global* not true.
path: '/path/to/my/node_modules/'
});
if (ret == 'error') {
// Failed to detect or update.
}
if (ret == 'lastest') {
// Success to detect and the lastest version had been installed.
}
if (ret == 'updated') {
// Success to detect and update.
}