diff options
author | codecalm <codecalm@gmail.com> | 2020-03-22 17:08:19 +0100 |
---|---|---|
committer | codecalm <codecalm@gmail.com> | 2020-03-22 17:08:19 +0100 |
commit | 8d1997052c361c484f7249919da75644fd1a2ab5 (patch) | |
tree | 9a4a8045c18769001b5a384e695f80199205a139 /gulpfile.js | |
parent | Release 1.1.0 (diff) | |
download | tabler-icons-8d1997052c361c484f7249919da75644fd1a2ab5.tar.xz |
changelog format fix
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/gulpfile.js b/gulpfile.js index ad524867..4dc72413 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -71,20 +71,29 @@ const createScreenshot = async (filePath) => { }; -const printChangelog = function (newIcons, modifiedIcons, renamedIcons) { +const printChangelog = function (newIcons, modifiedIcons, renamedIcons, pretty = false) { if (newIcons.length > 0) { - let str = ''; - str += `${newIcons.length} new icons: `; + if(pretty) { + console.log(`### ${newIcons.length} new icons:`); - newIcons.forEach(function (icon, i) { - str += `\`${icon}\``; + newIcons.forEach(function (icon, i) { + console.log(`- \`${icon}\``); + }); + } else { + let str = ''; + str += `${newIcons.length} new icons: `; - if ((i + 1) <= newIcons.length - 1) { - str += ', ' - } - }); + newIcons.forEach(function (icon, i) { + str += `\`${icon}\``; + + if ((i + 1) <= newIcons.length - 1) { + str += ', ' + } + }); + + console.log(str); + } - console.log(str); console.log(''); } @@ -332,7 +341,7 @@ gulp.task('changelog', function (cb) { return newIcons.indexOf(el) < 0; }); - printChangelog(newIcons, modifiedIcons, renamedIcons); + printChangelog(newIcons, modifiedIcons, renamedIcons, true); cb(); }); |