mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
init changelog script (#1883)
* init changelog script * Create eleven-flies-sing.md
This commit is contained in:
29
gulpfile.js
29
gulpfile.js
@@ -22,7 +22,6 @@ const gulp = require('gulp'),
|
||||
spawn = require('cross-spawn'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
YAML = require('yaml'),
|
||||
yargs = require('yargs/yargs'),
|
||||
cp = require('child_process'),
|
||||
pkg = require('./package.json'),
|
||||
@@ -73,34 +72,6 @@ if (!Array.prototype.flat) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate CHANGELOG.md
|
||||
*/
|
||||
gulp.task('changelog', (cb) => {
|
||||
const content = YAML.parse(fs.readFileSync('./src/pages/_data/changelog.yml', 'utf8')).reverse()
|
||||
let readme = `# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.\n`
|
||||
|
||||
content.forEach((change) => {
|
||||
readme += `\n\n## \`${change.version}\` - ${change.date}\n\n`
|
||||
|
||||
if (change.description) {
|
||||
readme += `**${change.description}**\n\n`
|
||||
}
|
||||
|
||||
change.changes.forEach((line) => {
|
||||
readme += `- ${line}\n`
|
||||
})
|
||||
|
||||
console.log(change.version);
|
||||
})
|
||||
|
||||
fs.writeFileSync('CHANGELOG.md', readme)
|
||||
|
||||
cb()
|
||||
})
|
||||
|
||||
/**
|
||||
* Check unused Jekyll partials
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user