From ec925689098e202e9dcb3b0aa3dc95c88b157c80 Mon Sep 17 00:00:00 2001 From: Mister-Hope Date: Thu, 16 Jan 2025 01:30:21 +0800 Subject: [PATCH] build: tweaks --- plugins/blog/plugin-comment/package.json | 2 +- plugins/features/plugin-back-to-top/package.json | 2 +- plugins/features/plugin-catalog/package.json | 2 +- plugins/features/plugin-copy-code/package.json | 2 +- plugins/features/plugin-icon/package.json | 2 +- plugins/features/plugin-notice/package.json | 2 +- plugins/features/plugin-photo-swipe/package.json | 2 +- plugins/markdown/plugin-markdown-ext/package.json | 2 +- plugins/markdown/plugin-markdown-hint/package.json | 2 +- plugins/markdown/plugin-markdown-image/package.json | 2 +- plugins/markdown/plugin-markdown-math/package.json | 2 +- plugins/markdown/plugin-markdown-tab/package.json | 2 +- plugins/markdown/plugin-revealjs/package.json | 2 +- plugins/markdown/plugin-shiki/package.json | 2 +- plugins/pwa/plugin-pwa/package.json | 2 +- plugins/search/plugin-search/package.json | 2 +- plugins/search/plugin-slimsearch/package.json | 2 +- plugins/tools/plugin-redirect/package.json | 2 +- tools/create-vuepress/tsconfig.build.json | 3 +-- tools/helper/package.json | 8 ++++++-- tools/helper/tsconfig.build.json | 3 +-- tools/highlighter-helper/package.json | 2 +- tools/vp-update/tsconfig.build.json | 3 +-- 23 files changed, 28 insertions(+), 27 deletions(-) diff --git a/plugins/blog/plugin-comment/package.json b/plugins/blog/plugin-comment/package.json index 2d66297e8f..ef83819a3d 100644 --- a/plugins/blog/plugin-comment/package.json +++ b/plugins/blog/plugin-comment/package.json @@ -44,7 +44,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/plugins/features/plugin-back-to-top/package.json b/plugins/features/plugin-back-to-top/package.json index 428abba7d9..faf4effb07 100644 --- a/plugins/features/plugin-back-to-top/package.json +++ b/plugins/features/plugin-back-to-top/package.json @@ -35,7 +35,7 @@ "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.svg\" lib", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/plugins/features/plugin-catalog/package.json b/plugins/features/plugin-catalog/package.json index 6dec795a86..d79282556f 100644 --- a/plugins/features/plugin-catalog/package.json +++ b/plugins/features/plugin-catalog/package.json @@ -39,7 +39,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/plugins/features/plugin-copy-code/package.json b/plugins/features/plugin-copy-code/package.json index a6e423a708..7144800ef0 100644 --- a/plugins/features/plugin-copy-code/package.json +++ b/plugins/features/plugin-copy-code/package.json @@ -40,7 +40,7 @@ "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.svg\" lib", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/plugins/features/plugin-icon/package.json b/plugins/features/plugin-icon/package.json index f9bd3fa388..4e304b1ee9 100644 --- a/plugins/features/plugin-icon/package.json +++ b/plugins/features/plugin-icon/package.json @@ -38,7 +38,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@mdit/plugin-icon": "^0.16.5", diff --git a/plugins/features/plugin-notice/package.json b/plugins/features/plugin-notice/package.json index d2ae76192f..051056a513 100644 --- a/plugins/features/plugin-notice/package.json +++ b/plugins/features/plugin-notice/package.json @@ -35,7 +35,7 @@ "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.svg\" lib", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/plugins/features/plugin-photo-swipe/package.json b/plugins/features/plugin-photo-swipe/package.json index 19e3a71c65..8f6b101181 100644 --- a/plugins/features/plugin-photo-swipe/package.json +++ b/plugins/features/plugin-photo-swipe/package.json @@ -40,7 +40,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/plugins/markdown/plugin-markdown-ext/package.json b/plugins/markdown/plugin-markdown-ext/package.json index 7db2ab1ad1..f08282d63d 100644 --- a/plugins/markdown/plugin-markdown-ext/package.json +++ b/plugins/markdown/plugin-markdown-ext/package.json @@ -38,7 +38,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@mdit/plugin-container": "^0.16.0", diff --git a/plugins/markdown/plugin-markdown-hint/package.json b/plugins/markdown/plugin-markdown-hint/package.json index f5a2e8ce90..960f9f732f 100644 --- a/plugins/markdown/plugin-markdown-hint/package.json +++ b/plugins/markdown/plugin-markdown-hint/package.json @@ -39,7 +39,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@mdit/plugin-alert": "^0.16.0", diff --git a/plugins/markdown/plugin-markdown-image/package.json b/plugins/markdown/plugin-markdown-image/package.json index 07cd5919c7..2adb619045 100644 --- a/plugins/markdown/plugin-markdown-image/package.json +++ b/plugins/markdown/plugin-markdown-image/package.json @@ -44,7 +44,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@mdit/plugin-figure": "^0.16.0", diff --git a/plugins/markdown/plugin-markdown-math/package.json b/plugins/markdown/plugin-markdown-math/package.json index 8b971821b3..249de741ea 100644 --- a/plugins/markdown/plugin-markdown-math/package.json +++ b/plugins/markdown/plugin-markdown-math/package.json @@ -38,7 +38,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@mdit/plugin-katex-slim": "^0.16.2", diff --git a/plugins/markdown/plugin-markdown-tab/package.json b/plugins/markdown/plugin-markdown-tab/package.json index ef5bfb7628..0d9a661011 100644 --- a/plugins/markdown/plugin-markdown-tab/package.json +++ b/plugins/markdown/plugin-markdown-tab/package.json @@ -39,7 +39,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@mdit/plugin-tab": "^0.16.0", diff --git a/plugins/markdown/plugin-revealjs/package.json b/plugins/markdown/plugin-revealjs/package.json index dbf80c779e..b025562c55 100644 --- a/plugins/markdown/plugin-revealjs/package.json +++ b/plugins/markdown/plugin-revealjs/package.json @@ -41,7 +41,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@mdit/plugin-uml": "^0.16.0", diff --git a/plugins/markdown/plugin-shiki/package.json b/plugins/markdown/plugin-shiki/package.json index bf750acce4..8ef4ec8f20 100644 --- a/plugins/markdown/plugin-shiki/package.json +++ b/plugins/markdown/plugin-shiki/package.json @@ -35,7 +35,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@shikijs/transformers": "^1.27.2", diff --git a/plugins/pwa/plugin-pwa/package.json b/plugins/pwa/plugin-pwa/package.json index 23c7efea8e..a46c34d026 100644 --- a/plugins/pwa/plugin-pwa/package.json +++ b/plugins/pwa/plugin-pwa/package.json @@ -39,7 +39,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/plugins/search/plugin-search/package.json b/plugins/search/plugin-search/package.json index 508f73b525..7b3cae7322 100644 --- a/plugins/search/plugin-search/package.json +++ b/plugins/search/plugin-search/package.json @@ -35,7 +35,7 @@ "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.{d.ts,svg}\" lib", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/plugins/search/plugin-slimsearch/package.json b/plugins/search/plugin-slimsearch/package.json index dceeda2f20..ab5088d6d3 100644 --- a/plugins/search/plugin-slimsearch/package.json +++ b/plugins/search/plugin-slimsearch/package.json @@ -40,7 +40,7 @@ "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.{d.ts,svg}\" lib", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/plugins/tools/plugin-redirect/package.json b/plugins/tools/plugin-redirect/package.json index 323bdbd1b2..af921ef677 100644 --- a/plugins/tools/plugin-redirect/package.json +++ b/plugins/tools/plugin-redirect/package.json @@ -41,7 +41,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vuepress/helper": "workspace:*", diff --git a/tools/create-vuepress/tsconfig.build.json b/tools/create-vuepress/tsconfig.build.json index 4f60f73883..458814cb0c 100644 --- a/tools/create-vuepress/tsconfig.build.json +++ b/tools/create-vuepress/tsconfig.build.json @@ -2,8 +2,7 @@ "extends": "../../tsconfig.build.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./lib", - "baseUrl": "." + "outDir": "./lib" }, "include": ["./src"] } diff --git a/tools/helper/package.json b/tools/helper/package.json index 9fe5a03cdc..92813a5148 100644 --- a/tools/helper/package.json +++ b/tools/helper/package.json @@ -33,18 +33,22 @@ "./colors.css": "./lib/client/styles/colors.css", "./normalize.css": "./lib/client/styles/normalize.css", "./sr-only.css": "./lib/client/styles/sr-only.css", + "./scss/*.scss": { + "sass": "./scss/*.scss" + }, "./package.json": "./package.json" }, "main": "./lib/node/index.js", "types": "./lib/node/index.d.ts", "files": [ - "lib" + "lib", + "sass" ], "scripts": { "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "dependencies": { "@vue/shared": "^3.5.13", diff --git a/tools/helper/tsconfig.build.json b/tools/helper/tsconfig.build.json index 4f60f73883..458814cb0c 100644 --- a/tools/helper/tsconfig.build.json +++ b/tools/helper/tsconfig.build.json @@ -2,8 +2,7 @@ "extends": "../../tsconfig.build.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./lib", - "baseUrl": "." + "outDir": "./lib" }, "include": ["./src"] } diff --git a/tools/highlighter-helper/package.json b/tools/highlighter-helper/package.json index e8015ab53b..d2499eb2cd 100644 --- a/tools/highlighter-helper/package.json +++ b/tools/highlighter-helper/package.json @@ -38,7 +38,7 @@ "build": "tsc -b tsconfig.build.json", "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", - "style": "sass src:lib --embed-sources --style=compressed" + "style": "sass src:lib --embed-sources --style=compressed --pkg-importer=node" }, "peerDependencies": { "@vueuse/core": "^12.2.0", diff --git a/tools/vp-update/tsconfig.build.json b/tools/vp-update/tsconfig.build.json index 4f60f73883..458814cb0c 100644 --- a/tools/vp-update/tsconfig.build.json +++ b/tools/vp-update/tsconfig.build.json @@ -2,8 +2,7 @@ "extends": "../../tsconfig.build.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./lib", - "baseUrl": "." + "outDir": "./lib" }, "include": ["./src"] }