mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(changelog) add prepend
This commit is contained in:
parent
24be2e5803
commit
4bd43154c7
2 changed files with 12 additions and 4 deletions
|
|
@ -2,14 +2,21 @@
|
|||
'use strict';
|
||||
|
||||
var changelog = require('changelog-io'),
|
||||
prepend = require('prepend'),
|
||||
cl = require('../cl');
|
||||
|
||||
module.exports = function(callback) {
|
||||
cl(function(error, versionNew) {
|
||||
if (error)
|
||||
callback(error);
|
||||
else
|
||||
changelog(versionNew, callback);
|
||||
var e = function(error) {
|
||||
if (error)
|
||||
callback(error);
|
||||
|
||||
return error;
|
||||
};
|
||||
|
||||
e(error) || changelog(versionNew, function(error, data) {
|
||||
e(error) || prepend('ChangeLog', data, callback);
|
||||
});
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
"minor": "~1.2.2",
|
||||
"morgan": "~1.5.0",
|
||||
"place": "~1.0.0",
|
||||
"prepend": "~1.0.2",
|
||||
"should": "~4.4.1",
|
||||
"version-io": "~1.0.3"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue