Browse Source

chore: gh-pages modify

richard1015 4 years ago
parent
commit
e51304064b
4 changed files with 5 additions and 5 deletions
  1. 1 1
      .github/workflows/gh-pages.yml
  2. 0 2
      .prettierignore
  3. 2 1
      package.json
  4. 2 1
      vite.config.ts

+ 1 - 1
.github/workflows/gh-pages.yml

@@ -16,4 +16,4 @@ jobs:
         uses: peaceiris/actions-gh-pages@v3
         with:
           github_token: ${{ secrets.GITHUB_TOKEN }}
-          publish_dir: ./dist
+          publish_dir: ./dist/3x

+ 0 - 2
.prettierignore

@@ -6,6 +6,4 @@
 **/*.woff
 **/*.eot
 package.json
-lib/plugin/cli/site/doc/page
-lib/plugin/cli/site/doc/view
 node_modules

+ 2 - 1
package.json

@@ -39,10 +39,11 @@
     "checked": "npm run generate:file && rm -rf dist/ && tsc",
     "dev": "npm run checked && vite --open",
     "build:site": "npm run checked && vite build",
+    "build:site:oss": "npm run checked && vite build --base=/nutui/3x/",
     "build": "npm run checked && vite build --config vite.config.build.ts && npm run generate:types",
     "build:disperse": "vite build --config vite.config.build.disperse.ts",
     "serve": "vite preview",
-    "upload": "yarn build:site && node ./jd/upload.js",
+    "upload": "yarn build:site:oss && node ./jd/upload.js",
     "add": "node jd/createComponentMode.js",
     "publish:beta": "npm publish --tag=beta",
     "generate:file": "node jd/generate-nutui.js",

+ 2 - 1
vite.config.ts

@@ -5,7 +5,7 @@ import path from 'path';
 const resolve = path.resolve;
 // https://vitejs.dev/config/
 export default defineConfig({
-  base: '/nutui/3x/',
+  base: '/3x/',
   server: {
     proxy: {
       '/devServer': {
@@ -34,6 +34,7 @@ export default defineConfig({
     Markdown()
   ],
   build: {
+    outDir: './dist/3x/',
     cssCodeSplit: false,
     rollupOptions: {
       input: {