Skip to content

Commit

Permalink
ci: add build v3 scripts (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
kagol committed Feb 25, 2025
1 parent 1e56c63 commit 474a055
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dev": "pnpm -F docs dev",
"dev:projects": "pnpm -F projects dev",
"build": "pnpm -F docs build",
"build:v3": "pnpm -F docs build:v3",
"build:projects": "pnpm -F projects build",
"build:lib": "pnpm -F @opentiny/fluent-editor build",
"lint": "eslint . --cache",
Expand Down
1 change: 1 addition & 0 deletions packages/docs/fluent-editor/.env.v3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_BASE_URL=/
6 changes: 4 additions & 2 deletions packages/docs/fluent-editor/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { fileURLToPath, URL } from 'node:url'
import { demoPreviewPlugin } from '@vitepress-code-preview/plugin'
import { defineConfig } from 'vitepress'
import { defineConfig, loadEnv } from 'vitepress'
import { sidebar } from './sidebar'

const env = loadEnv(process.env.VITE_BASE_URL, fileURLToPath(new URL('../', import.meta.url)))

export default defineConfig({
title: 'TinyEditor',
titleTemplate: '基于 Quill 2.0 的富文本编辑器',
description: '富文本编辑器, Rich text editor, rich-text-editor, rich-text, wysiwyg, wysiwyg-editor, quill, fluent-editor, tiny-editor',
base: '/tiny-editor/',
base: env.VITE_BASE_URL || '/tiny-editor/',
cleanUrls: true,
head: [
['link', { rel: 'icon', href: 'favicon.ico' }],
Expand Down
1 change: 1 addition & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "vitepress dev fluent-editor",
"build": "vitepress build fluent-editor",
"build:v3": "node --env-file=fluent-editor/.env.v3 ./node_modules/vitepress/bin/vitepress.js build fluent-editor",
"preview": "vitepress preview fluent-editor",
"install:browser": "pnpm exec playwright install --with-deps chromium",
"test": "pnpm exec playwright test",
Expand Down

0 comments on commit 474a055

Please sign in to comment.