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 1
1
import { defineConfig } from 'dumi' ;
2
2
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
+
3
12
export default defineConfig ( {
4
13
title : 'Happy UI' ,
5
14
mode : 'site' ,
6
15
outputPath : 'doc-site' ,
7
16
exportStatic : { } ,
8
17
dynamicImport : { } ,
18
+ base,
19
+ publicPath,
9
20
} ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 13
13
"scripts" : {
14
14
"dev" : " dumi dev" ,
15
15
"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" ,
17
19
"clean" : " rimraf lib esm dist" ,
18
20
"build:types" : " tsc -p tsconfig.build.json && cpr lib esm" ,
19
21
"build" : " npm run clean && npm run build:types && gulp" ,
20
- "publish:doc" : " now --prod" ,
21
- "now-build" : " npm run build:doc" ,
22
22
"commit" : " git-cz" ,
23
23
"test" : " jest" ,
24
24
"test:watch" : " jest --watch" ,
84
84
"babel-plugin-import" : " ^1.13.3" ,
85
85
"commitizen" : " ^4.0.3" ,
86
86
"cpr" : " ^3.0.1" ,
87
+ "cross-env" : " ^7.0.3" ,
87
88
"cz-conventional-changelog" : " ^3.0.2" ,
88
89
"doctoc" : " ^1.4.0" ,
89
90
"dumi" : " ^1.0.13" ,
91
+ "gh-pages" : " ^3.2.3" ,
90
92
"gulp" : " ^4.0.2" ,
91
93
"gulp-autoprefixer" : " ^7.0.1" ,
92
94
"gulp-babel" : " ^8.0.0" ,
97
99
"jest" : " ^24.9.0" ,
98
100
"less" : " ^3.10.3" ,
99
101
"lint-staged" : " ^9.5.0" ,
100
- "now" : " ^19.0.1" ,
101
102
"plop" : " ^2.6.0" ,
102
103
"prettier" : " ^1.19.1" ,
103
104
"react" : " ^16.8.0" ,
104
105
"react-dom" : " ^16.8.0" ,
105
106
"rimraf" : " ^3.0.0" ,
107
+ "serve" : " ^12.0.0" ,
106
108
"snapshot-diff" : " ^0.6.1" ,
107
109
"through2" : " ^3.0.1" ,
108
110
"ts-jest" : " ^24.2.0" ,
You can’t perform that action at this time.
0 commit comments