Skip to content

Commit fc0e7cf

Browse files
zhangboyangzhangboyang
authored andcommitted
fix: 修改发布文档发布cdn脚本
1 parent 9c2c8dc commit fc0e7cf

File tree

5 files changed

+17
-54
lines changed

5 files changed

+17
-54
lines changed

docs/package-lock.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "deer-ui-docs",
3-
"version": "3.0.0",
3+
"version": "1.1.8",
44
"description": "deer-ui组件库文档",
55
"main": "index.html",
66
"scripts": {
7-
"publish": "npm version patch && npm publish --registry https://registry.npmjs.org"
7+
"publish:docs": "npm version patch && npm publish --registry https://registry.npmjs.org"
88
},
99
"keywords": [
1010
"deer",

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"docz:dev": "docz dev",
2020
"docz:build": "docz build",
2121
"deploy": "./scripts/deploy.sh",
22-
"pub:docs": "npm run build:docs && storybook-to-ghpages --existing-output-dir=docs/build",
22+
"pub:docs": "npm run build:docs && npm run pubdocs && storybook-to-ghpages --existing-output-dir=docs/build",
2323
"build:docs": "rimraf docs/build && build-storybook -c .storybook -o docs/build",
2424
"storybook": "start-storybook -p 8080 -c .storybook",
2525
"build:types": "rimraf types && tsc --outDir types -d --emitDeclarationOnly",
@@ -30,6 +30,7 @@
3030
"build:lib": "cross-env OUTPUT_MODULE=commonjs babel components -d lib --ignore **/__tests__",
3131
"build": "npm run clean && npm run build:umd && npm run build:es && npm run build:lib && npm run build:css",
3232
"commit": "git-cz",
33+
"pubdocs": "node ./scripts/pubdocs.js",
3334
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r",
3435
"ver:major": "npm version major",
3536
"ver:minor": "npm version minor",
@@ -163,6 +164,7 @@
163164
"babel-plugin-syntax-dynamic-import": "^6.18.0",
164165
"babel-runtime": "^6.26.0",
165166
"cache-loader": "^4.1.0",
167+
"child_process": "^1.0.2",
166168
"clean-webpack-plugin": "^3.0.0",
167169
"commitlint": "^8.2.0",
168170
"conventional-changelog-cli": "^2.0.31",

scripts/pubdocs.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const { execSync } = require('child_process');
2+
try {
3+
execSync(`cd docs; npm run publish:docs;`);
4+
} catch (err) {
5+
console.log(err);
6+
}

0 commit comments

Comments
 (0)