chore: remove windicss
This commit is contained in:
parent
15d9265b21
commit
6e6c214e59
@ -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.
|
||||
@ -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配置
|
||||
@ -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 <volodymyr@foxmail.com>",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
import { defineClientConfig } from '@vuepress/client'
|
||||
|
||||
// import 'virtual:windi-devtools'
|
||||
import 'virtual:windi.css'
|
||||
|
||||
export default defineClientConfig({})
|
||||
@ -1,5 +0,0 @@
|
||||
import { defineClientConfig } from '@vuepress/client'
|
||||
|
||||
import 'windi.css'
|
||||
|
||||
export default defineClientConfig({})
|
||||
@ -1,5 +0,0 @@
|
||||
import { windiCSSPlugin } from './plugin.js'
|
||||
|
||||
export * from './plugin.js'
|
||||
|
||||
export default windiCSSPlugin
|
||||
@ -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),
|
||||
)
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
17
plugins/plugin-windicss/src/node/windicss.d.ts
vendored
17
plugins/plugin-windicss/src/node/windicss.d.ts
vendored
@ -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 }
|
||||
// }
|
||||
@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": "../tsconfig.build.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib"
|
||||
},
|
||||
"include": ["./src"]
|
||||
}
|
||||
@ -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" }
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user