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

re-publish docs (#1872)

上级 a6b99c9c
此差异已折叠。
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"clean": "shx rm -fr dist/*", "clean": "shx rm -fr dist/*",
"dist": "npm run clean && npm run build", "dist": "npm run clean && npm run build",
"pack": "npm pack", "pack": "npm pack",
"doc": "bash -x scripts/generate-docs.sh", "docs": "bash -x scripts/generate-docs.sh",
"coverage": "nyc report --reporter=text-lcov | coveralls", "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", "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", "doctor": "npm run check-node-version && ts-node bin/doctor",
...@@ -95,7 +95,6 @@ ...@@ -95,7 +95,6 @@
"qr-image": "^3.2.0", "qr-image": "^3.2.0",
"raven": "^2.6.2", "raven": "^2.6.2",
"read-pkg-up": "^6.0.0", "read-pkg-up": "^6.0.0",
"semver": "^6.0.0",
"state-switch": "^0.6.2", "state-switch": "^0.6.2",
"watchdog": "^0.8.1", "watchdog": "^0.8.1",
"wechaty-puppet": "^0.17.2", "wechaty-puppet": "^0.17.2",
...@@ -107,6 +106,7 @@ ...@@ -107,6 +106,7 @@
"@babel/preset-env": "^7.0.0", "@babel/preset-env": "^7.0.0",
"@chatie/eslint-config": "^0.8.1", "@chatie/eslint-config": "^0.8.1",
"@chatie/git-scripts": "^0.2.3", "@chatie/git-scripts": "^0.2.3",
"@chatie/semver": "^0.4.7",
"@chatie/tsconfig": "^0.6.1", "@chatie/tsconfig": "^0.6.1",
"@types/blessed": "^0.1.10", "@types/blessed": "^0.1.10",
"@types/cuid": "^1.3.0", "@types/cuid": "^1.3.0",
...@@ -120,7 +120,6 @@ ...@@ -120,7 +120,6 @@
"@types/raven": "^2.1.0", "@types/raven": "^2.1.0",
"@types/request": "^2.47.1", "@types/request": "^2.47.1",
"@types/retry": "^0.12.0", "@types/retry": "^0.12.0",
"@types/semver": "^6.0.0",
"@types/sinon": "^7.0.4", "@types/sinon": "^7.0.4",
"@types/ws": "^6.0.0", "@types/ws": "^6.0.0",
"apiai": "^4.0.0", "apiai": "^4.0.0",
......
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
npm version VERSION=$(npx pkg-jq -r .version)
echo "Version $VERSION"
if [ "$1" != "-f" ] && ./scripts/development-release.ts; then if ! npx --package @chatie/semver semver-is-prod $VERSION; then
echo "Current release is a development release, please only update the docs when there's a stable release." echo "Current release is a development release, please only update the docs when there's a stable release."
exit 1
else if [ "$1" != "-f" ]; then
echo "Generating docs ..." echo "Or use -f to force generating."
npm run dist exit 1
echo -e '# Wechaty v'$(jq -r .version package.json)' Documentation\n\n- Blog - <https://blog.chatie.io>\n- Docs - <https://docs.chatie.io>\n\n' > docs/index.md else
jsdoc2md dist/src/wechaty.js dist/src/user/{room,contact,contact-self,friendship,message,room-invitation}.js >> docs/index.md echo "-f found. Forcing generating ..."
fi
fi fi
echo "Generating docs ..."
npm run dist
echo -e '# Wechaty v'$(jq -r .version package.json)' Documentation\n\n- Blog - <https://blog.chatie.io>\n- Docs - <https://docs.chatie.io>\n\n' > docs/index.md
jsdoc2md dist/src/wechaty.js dist/src/user/{room,contact,contact-self,friendship,message,room-invitation}.js >> docs/index.md
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册