diff --git a/plugins/plugin-windicss/LICENSE b/plugins/plugin-windicss/LICENSE deleted file mode 100644 index 9f677c90..00000000 --- a/plugins/plugin-windicss/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (C) 2021 - PRESENT by pengzhanbo - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/plugins/plugin-windicss/README.md b/plugins/plugin-windicss/README.md deleted file mode 100644 index 34859179..00000000 --- a/plugins/plugin-windicss/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# `@vuepress-plume/plugin-windicss` - -添加 `windicss` 支持 - -## Install -``` -yarn add @vuepress-plume/plugin-windicss -``` -## Usage -``` js -// .vuepress/config.js -const { windicssPlugin } = require('@vuepress-plume/plugin-windicss') -const path = require('path') -module.exports = { - //... - plugins: [ - windicssPlugin(path.resolve(__dirname, 'windi.config.js')) - ] - // ... -} -``` - -## Method - -`windicssPlugin(options)` - -- `options`: `{ userOptions?: UserOptions; utilsOptions?: WindiPluginUtilsOptions } | string` - - windicss 配置文件路径,或者 windicss配置 diff --git a/plugins/plugin-windicss/package.json b/plugins/plugin-windicss/package.json deleted file mode 100644 index 657de21d..00000000 --- a/plugins/plugin-windicss/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@vuepress-plume/plugin-windicss", - "version": "1.0.0-rc.5", - "description": "The Plugin for VuePress 2", - "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", - "bugs": { - "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" - }, - "license": "MIT", - "author": "pengzhanbo ", - "type": "module", - "exports": { - ".": "./lib/node/index.js", - "./package.json": "./package.json" - }, - "main": "lib/node/index.js", - "types": "lib/node/index.d.ts", - "files": [ - "lib" - ], - "scripts": { - "build": "pnpm run clean && pnpm run copy && pnpm run ts", - "clean": "rimraf lib *.tsbuildinfo", - "copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png}\" lib", - "ts": "tsc -b tsconfig.build.json" - }, - "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "vite-plugin-windicss": "^1.9.3", - "windicss": "^3.5.6", - "windicss-webpack-plugin": "^1.8.0" - }, - "publishConfig": { - "access": "public" - }, - "keyword": [ - "VuePress", - "vuepress plugin", - "Windicss", - "vuepress-plugin-windicss" - ] -} diff --git a/plugins/plugin-windicss/src/client/config.vite.ts b/plugins/plugin-windicss/src/client/config.vite.ts deleted file mode 100644 index 6558b17a..00000000 --- a/plugins/plugin-windicss/src/client/config.vite.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { defineClientConfig } from '@vuepress/client' - -// import 'virtual:windi-devtools' -import 'virtual:windi.css' - -export default defineClientConfig({}) diff --git a/plugins/plugin-windicss/src/client/config.webpack.ts b/plugins/plugin-windicss/src/client/config.webpack.ts deleted file mode 100644 index 1c378c86..00000000 --- a/plugins/plugin-windicss/src/client/config.webpack.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { defineClientConfig } from '@vuepress/client' - -import 'windi.css' - -export default defineClientConfig({}) diff --git a/plugins/plugin-windicss/src/node/index.ts b/plugins/plugin-windicss/src/node/index.ts deleted file mode 100644 index 1a8a58b8..00000000 --- a/plugins/plugin-windicss/src/node/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { windiCSSPlugin } from './plugin.js' - -export * from './plugin.js' - -export default windiCSSPlugin diff --git a/plugins/plugin-windicss/src/node/plugin.ts b/plugins/plugin-windicss/src/node/plugin.ts deleted file mode 100644 index e32f6e67..00000000 --- a/plugins/plugin-windicss/src/node/plugin.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { App, Plugin } from '@vuepress/core' -import { getDirname, path } from '@vuepress/utils' -import viteWindiCSS from 'vite-plugin-windicss' -import type { UserOptions, WindiPluginUtilsOptions } from 'vite-plugin-windicss' -import WebpackWindiCSSPlugin from 'windicss-webpack-plugin' - -const __dirname = getDirname(import.meta.url) -export interface WindiCSSOptions { - userOptions?: UserOptions - utilsOptions?: WindiPluginUtilsOptions -} - -export const windiCSSPlugin = (options?: WindiCSSOptions | string): Plugin => { - let userOptions: UserOptions | undefined - let utilsOptions: WindiPluginUtilsOptions | undefined - if (typeof options === 'string') { - userOptions = { - config: options, - scan: { - include: ['**/.vuepress/**/*.{vue,jsx,tsx}', '**/*.md'], - }, - } - } else { - options = options || {} - userOptions = options.userOptions - utilsOptions = options.utilsOptions - } - return (app: App) => { - const clientConfigFile = - app.options.bundler.name === '@vuepress/bundler-vite' - ? path.resolve(__dirname, '../client/config.vite.js') - : path.resolve(__dirname, '../client/config.webpack.js') - return { - name: '@vuepress-plume/plugin-windicss', - clientConfigFile, - extendsBundlerOptions: (bundlerOptions, app: App) => { - if (app.options.bundler.name === '@vuepress/bundler-vite') { - bundlerOptions.viteOptions ??= {} - bundlerOptions.viteOptions.plugins ??= [] - bundlerOptions.viteOptions.plugins.push( - viteWindiCSS(userOptions, utilsOptions), - ) - } - if (app.options.bundler.name === '@vuepress/bundler-webpack') { - bundlerOptions.configureWebpack && - bundlerOptions.configureWebpack((config: any) => { - config.plugins.push( - new (WebpackWindiCSSPlugin as any)(userOptions), - ) - }) - } - }, - } - } -} diff --git a/plugins/plugin-windicss/src/node/windicss.d.ts b/plugins/plugin-windicss/src/node/windicss.d.ts deleted file mode 100644 index 50c54b58..00000000 --- a/plugins/plugin-windicss/src/node/windicss.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -// declare module 'windicss-webpack-plugin' { -// const result: any - -// export default result -// } - -// declare module 'vite-plugin-windicss' { -// const result: any - -// type UserOptions = any - -// type WindiPluginUtilsOptions = any - -// export default result - -// export { UserOptions, WindiPluginUtilsOptions } -// } diff --git a/plugins/plugin-windicss/tsconfig.build.json b/plugins/plugin-windicss/tsconfig.build.json deleted file mode 100644 index 6bf67375..00000000 --- a/plugins/plugin-windicss/tsconfig.build.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../tsconfig.build.json", - "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib" - }, - "include": ["./src"] -} diff --git a/plugins/tsconfig.build.json b/plugins/tsconfig.build.json index e3ae79aa..652efb2b 100644 --- a/plugins/tsconfig.build.json +++ b/plugins/tsconfig.build.json @@ -14,7 +14,6 @@ { "path": "./plugin-netlify-functions/tsconfig.build.json" }, { "path": "./plugin-notes-data/tsconfig.build.json" }, { "path": "./plugin-page-collection/tsconfig.build.json" }, - { "path": "./plugin-windicss/tsconfig.build.json" }, { "path": "./plugin-shikiji/tsconfig.build.json" } ] }