Skip to content

Commit 2cc9d40

Browse files
authored
ci: add build v3 scripts (#234)
1 parent 3ebe740 commit 2cc9d40

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"dev": "pnpm -F docs dev",
2929
"dev:projects": "pnpm -F projects dev",
3030
"build": "pnpm -F docs build",
31+
"build:v3": "pnpm -F docs build:v3",
3132
"build:projects": "pnpm -F projects build",
3233
"build:lib": "pnpm -F @opentiny/fluent-editor build",
3334
"lint": "eslint . --cache",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_BASE_URL=/

packages/docs/fluent-editor/.vitepress/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { fileURLToPath, URL } from 'node:url'
22
import { demoPreviewPlugin } from '@vitepress-code-preview/plugin'
3-
import { defineConfig } from 'vitepress'
3+
import { defineConfig, loadEnv } from 'vitepress'
44
import { sidebar } from './sidebar'
55

6+
const env = loadEnv(process.env.VITE_BASE_URL, fileURLToPath(new URL('../', import.meta.url)))
7+
68
export default defineConfig({
79
title: 'TinyEditor',
810
titleTemplate: '基于 Quill 2.0 的富文本编辑器',
911
description: '富文本编辑器, Rich text editor, rich-text-editor, rich-text, wysiwyg, wysiwyg-editor, quill, fluent-editor, tiny-editor',
10-
base: '/tiny-editor/',
12+
base: env.VITE_BASE_URL || '/tiny-editor/',
1113
cleanUrls: true,
1214
head: [
1315
['link', { rel: 'icon', href: 'favicon.ico' }],

packages/docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "vitepress dev fluent-editor",
88
"build": "vitepress build fluent-editor",
9+
"build:v3": "node --env-file=fluent-editor/.env.v3 ./node_modules/vitepress/bin/vitepress.js build fluent-editor",
910
"preview": "vitepress preview fluent-editor",
1011
"install:browser": "pnpm exec playwright install --with-deps chromium",
1112
"test": "pnpm exec playwright test",

0 commit comments

Comments
 (0)