File tree Expand file tree Collapse file tree 4 files changed +417
-44
lines changed Expand file tree Collapse file tree 4 files changed +417
-44
lines changed Original file line number Diff line number Diff line change 11import { defineConfig } from 'dumi' ;
22
3+ // 此处更换为自己的仓库名
4+ let base = '/react-ui-library-tutorial' ;
5+ let publicPath = '/react-ui-library-tutorial/' ;
6+
7+ if ( process . env . DOC_BUILD_ENV === 'local' ) {
8+ base = undefined ;
9+ publicPath = undefined ;
10+ }
11+
312export default defineConfig ( {
413 title : 'Happy UI' ,
514 mode : 'site' ,
615 outputPath : 'doc-site' ,
716 exportStatic : { } ,
817 dynamicImport : { } ,
18+ base,
19+ publicPath,
920} ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1313 "scripts" : {
1414 "dev" : " dumi dev" ,
1515 "start" : " npm run dev" ,
16- "build:doc" : " rimraf doc-site && dumi build" ,
16+ "build:site" : " rimraf doc-site && dumi build" ,
17+ "preview:site" : " cross-env DOC_BUILD_ENV=local npm run build:site && serve doc-site" ,
18+ "deploy:site" : " npm run build:site && gh-pages -d doc-site" ,
1719 "clean" : " rimraf lib esm dist" ,
1820 "build:types" : " tsc -p tsconfig.build.json && cpr lib esm" ,
1921 "build" : " npm run clean && npm run build:types && gulp" ,
20- "publish:doc" : " now --prod" ,
21- "now-build" : " npm run build:doc" ,
2222 "commit" : " git-cz" ,
2323 "test" : " jest" ,
2424 "test:watch" : " jest --watch" ,
8484 "babel-plugin-import" : " ^1.13.3" ,
8585 "commitizen" : " ^4.0.3" ,
8686 "cpr" : " ^3.0.1" ,
87+ "cross-env" : " ^7.0.3" ,
8788 "cz-conventional-changelog" : " ^3.0.2" ,
8889 "doctoc" : " ^1.4.0" ,
8990 "dumi" : " ^1.0.13" ,
91+ "gh-pages" : " ^3.2.3" ,
9092 "gulp" : " ^4.0.2" ,
9193 "gulp-autoprefixer" : " ^7.0.1" ,
9294 "gulp-babel" : " ^8.0.0" ,
9799 "jest" : " ^24.9.0" ,
98100 "less" : " ^3.10.3" ,
99101 "lint-staged" : " ^9.5.0" ,
100- "now" : " ^19.0.1" ,
101102 "plop" : " ^2.6.0" ,
102103 "prettier" : " ^1.19.1" ,
103104 "react" : " ^16.8.0" ,
104105 "react-dom" : " ^16.8.0" ,
105106 "rimraf" : " ^3.0.0" ,
107+ "serve" : " ^12.0.0" ,
106108 "snapshot-diff" : " ^0.6.1" ,
107109 "through2" : " ^3.0.1" ,
108110 "ts-jest" : " ^24.2.0" ,
You can’t perform that action at this time.
0 commit comments