chore: add vant-cli pacakge

This commit is contained in:
陈嘉涵
2019-08-22 11:46:40 +08:00
parent c5514f73b8
commit 8cca48131e
6 changed files with 67 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
const path = require('path');
const shelljs = require('shelljs');
function changelog(dist, cmd) {
const basepath = process.cwd();
const tag = cmd.tag || 'v1.0.0';
shelljs.exec(`
basepath=${basepath}
github_changelog_generator \
--header-label "# 更新日志" \
--bugs-label "**Bug Fixes**" \
--enhancement-label "**Breaking changes**" \
--issues-label "**Issue**" \
--pr-label "**Improvements**" \
--no-issues \
--no-unreleased \
--since-tag ${tag} \
-o ${path.join(basepath, dist)}
`
);
}
module.exports = changelog;

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env node
const commander = require('commander');
const changelog = require('./changelog');
commander
.command('changelog <dir>')
.option('--tag [tag]', 'Since tag')
.action(changelog);
commander.parse(process.argv);