mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
feature(gulp) readme -> docs
This commit is contained in:
parent
bd3e1e5e64
commit
ad515830e8
1 changed files with 11 additions and 3 deletions
14
gulpfile.js
14
gulpfile.js
|
|
@ -105,17 +105,25 @@
|
|||
});
|
||||
|
||||
gulp.task('docs', function() {
|
||||
var version = Info.version,
|
||||
var history = 'Version history\n---------------\n',
|
||||
link = '//github.com/cloudcmd/archive/raw/master/cloudcmd',
|
||||
template = '- *{{ date }}*, ' +
|
||||
'**[v{{ version }}]' +
|
||||
'(' + link + '-v{{ version }}.zip)**\n',
|
||||
version = Info.version,
|
||||
versionNew = getNewVersion(),
|
||||
msg = 'ERROR: version is missing. gulp readme --v<version>';
|
||||
msg = 'ERROR: version is missing. gulp docs --v<version>';
|
||||
|
||||
if (!versionNew) {
|
||||
console.log(msg);
|
||||
} else {
|
||||
replaceVersion('README.md', version, versionNew);
|
||||
replaceVersion('HELP.md', version, versionNew);
|
||||
replaceVersion('HELP.md', history, history + Util.render(template, {
|
||||
date : Util.getShortDate,
|
||||
version : versionNew
|
||||
}));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
gulp.task('default', ['jshint', 'css', 'test']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue