提交 1b5e8b8b 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

add a doc generator with development release guarder

上级 cdb53e7e
......@@ -16,7 +16,7 @@
"scripts": {
"clean": "shx rm -fr dist/*",
"dist": "npm run clean && tsc && shx cp src/puppet-puppeteer/*.js dist/src/puppet-puppeteer/",
"doc": "npm run dist && echo '# Wechaty v'$(jq -r .version package.json)' Documentation\n* https://blog.chatie.io\n' > docs/index.md && jsdoc2md dist/src/{wechaty,room,contact,friend-request,message}.js dist/src/puppet-puppeteer/schema.js>> docs/index.md",
"doc": "bash -x scripts/generate-docs.sh",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"changelog": "github_changelog_generator -u chatie -p wechaty && sed -i'.bak' /greenkeeper/d CHANGELOG.md && sed -i'.bak' '/An in-range update of/d' CHANGELOG.md && ts-node scripts/sort-contributiveness.ts < CHANGELOG.md > CHANGELOG.new.md 2>/dev/null && cat CHANGELOG.md >> CHANGELOG.new.md && mv CHANGELOG.new.md CHANGELOG.md",
"doctor": "npm run check-node-version && ts-node bin/doctor",
......@@ -92,7 +92,6 @@
"node": ">= 8.5"
},
"dependencies": {
"@types/ws": "^5.1.0",
"bl": "^1.2.0",
"brolog": "^1.2.0",
"clone-class": "^0.6.3",
......@@ -131,6 +130,7 @@
"@types/semver": "^5.5.0",
"@types/sinon": "^4.3.1",
"@types/vinyl": "^2.0.2",
"@types/ws": "^5.1.0",
"@types/xml2js": "^0.4.0",
"apiai": "^4.0.0",
"babel-cli": "^6.26.0",
......
#!/usr/bin/env bash
set -e
npm version
if ./scripts/development-release.ts; then
echo "Current release is a development release, please only update the docs when there's a stable release."
exit 1
else
echo "Generating docs ..."
npm run dist
echo '# Wechaty v'$(jq -r .version package.json)' Documentation\n* https://blog.chatie.io\n' > docs/index.md
jsdoc2md dist/src/{wechaty,room,contact,friend-request,message}.js dist/src/puppet-puppeteer/schema.js >> docs/index.md
fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册