chore: update changelog script

This commit is contained in:
ULIVZ
2018-11-25 20:44:58 +08:00
parent 408d44b65e
commit f312ad8477
3 changed files with 4 additions and 39 deletions
+3 -3
View File
@@ -8,6 +8,7 @@
],
"description": "Minimalistic doc generator with Vue component based layout system",
"scripts": {
"bootstrap": "lerna bootstrap",
"boot": "node scripts/bootstrap.js",
"dev": "yarn workspace docs dev",
"build": "yarn workspace docs build",
@@ -16,7 +17,7 @@
"register-vuepress": "lerna exec --scope vuepress -- yarn link",
"lint": "eslint --fix packages/**/*.js packages/**/*.vue packages/**/bin/*",
"release": "yarn --pure-lockfile && node scripts/release.js",
"changelog": "node scripts/genChangelog.js run",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"test": "node scripts/test.js"
},
"gitHooks": {
@@ -37,7 +38,6 @@
"lint-staged": "^7.0.4",
"minimist": "^1.2.0",
"yorkie": "^1.0.3",
"inquirer": "^6.2.0",
"@vue/conventional-changelog": "^0.1.1"
"inquirer": "^6.2.0"
}
}
-27
View File
@@ -1,27 +0,0 @@
const execa = require('execa')
const cc = require('conventional-changelog')
const config = require('@vue/conventional-changelog')
const gen = module.exports = version => {
const fileStream = require('fs').createWriteStream(`CHANGELOG.md`)
cc({
config,
releaseCount: 0,
pkg: {
transform (pkg) {
pkg.version = `v${version}`
return pkg
}
}
}).pipe(fileStream).on('close', async () => {
delete process.env.PREFIX
await execa('git', ['add', '-A'], { stdio: 'inherit' })
await execa('git', ['commit', '-m', `chore: ${version} changelog`], { stdio: 'inherit' })
})
}
if (process.argv[2] === 'run') {
const version = require('../lerna.json').version
gen(version)
}
+1 -9
View File
@@ -1243,14 +1243,6 @@
source-map "^0.5.6"
vue-template-es2015-compiler "^1.6.0"
"@vue/conventional-changelog@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@vue/conventional-changelog/-/conventional-changelog-0.1.1.tgz#48d2227ca65c354cba4be60754ea531afd0c3718"
dependencies:
compare-func "^1.3.2"
execa "^0.10.0"
q "^1.5.1"
"@vue/test-utils@^1.0.0-beta.16":
version "1.0.0-beta.21"
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.0.0-beta.21.tgz#fe1ee11ce16072da7ef29420df4aa5c11f4560ff"
@@ -2603,7 +2595,7 @@ commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
compare-func@^1.3.1, compare-func@^1.3.2:
compare-func@^1.3.1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648"
dependencies: