-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
224 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
registry "https://registry.npmmirror.com/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,5 +40,8 @@ | |
"dependencies": { | ||
"lodash-es": "^4.17.21", | ||
"vue": "^3.3.4" | ||
}, | ||
"devDependencies": { | ||
"unbuild": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [0.7.4](https://github.com/viarotel-org/packages/compare/v0.7.3...v0.7.4) (2023-09-08) | ||
|
||
**Note:** Version bump only for package @viarotel-org/unocss-preset-shades | ||
|
||
|
||
|
||
|
||
|
||
|
||
## [0.7.3](https://github.com/viarotel-org/packages/compare/v0.7.2...v0.7.3) (2023-09-06) | ||
|
||
|
||
### Performance Improvements | ||
|
||
* 🚀 unocss-preset-shades 性能优化 ([b45599c](https://github.com/viarotel-org/packages/commit/b45599caf57240b923504f497f16b40df5978fd2)) | ||
|
||
|
||
|
||
|
||
|
||
## [0.7.2](https://github.com/viarotel-org/packages/compare/v0.7.1...v0.7.2) (2023-09-06) | ||
|
||
**Note:** Version bump only for package @viarotel-org/unocss-preset-shades | ||
|
||
|
||
|
||
|
||
|
||
## [0.7.1](https://github.com/viarotel-org/packages/compare/v0.7.0...v0.7.1) (2023-09-06) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* 📝 修复 unocss-preset-shades 文档描述错误 ([6a29580](https://github.com/viarotel-org/packages/commit/6a2958070e58b2f6c0047f5ec9e66ec5df23f31b)) | ||
|
||
|
||
|
||
|
||
|
||
# [0.7.0](https://github.com/viarotel-org/packages/compare/v0.6.1...v0.7.0) (2023-09-05) | ||
|
||
|
||
### Features | ||
|
||
* 🚀 unocss update ([073bec4](https://github.com/viarotel-org/packages/commit/073bec4f87dc68641fc15cefd5cc94320037e92e)) | ||
|
||
|
||
|
||
|
||
|
||
## [0.6.1](https://github.com/viarotel-org/packages/compare/v0.6.0...v0.6.1) (2023-09-05) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* 🔧 unocss-preset-shades 补全 ts 类型 以解决使用时编辑器报错的问题 ([5d5b63f](https://github.com/viarotel-org/packages/commit/5d5b63f303a2144cd97729893a87533dcbbc9ff9)) | ||
|
||
|
||
|
||
|
||
|
||
# [0.6.0](https://github.com/viarotel-org/packages/compare/v0.5.11...v0.6.0) (2023-09-05) | ||
|
||
|
||
### Features | ||
|
||
* 📦️ add unocss-preset-shades ([7356cff](https://github.com/viarotel-org/packages/commit/7356cffb51fa5a046abb05443f003394770d4b2c)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# vite-plugin-path | ||
|
||
🔍 一个用于 Vitejs 的插件,可以返回任意文件的绝对路径。 | ||
|
||
🔍 A plugin for Vitejs can return the absolute path of any file. | ||
|
||
## 安装 | ||
|
||
```shell | ||
npm install @viarotel-org/vite-plugin-path | ||
``` | ||
|
||
## 示例 | ||
|
||
首先使用该插件 | ||
|
||
```js | ||
// vite.config.js | ||
import { defineConfig } from 'vite' | ||
import useVitePluginPath from '@viarotel-org/vite-plugin-path' | ||
|
||
export default defineConfig({ | ||
// ... | ||
plugins: [useVitePluginPath()], | ||
// ... | ||
}) | ||
``` | ||
|
||
然后导入需要获取绝对路径的文件 | ||
|
||
```js | ||
// Demo.js | ||
import examplePath from '../../example.exe?path' | ||
|
||
console.log(examplePath) | ||
|
||
// 将输出 "C:/User/packages/vite-plugin-path/example.exe" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineBuildConfig } from 'unbuild' | ||
|
||
export default defineBuildConfig({ | ||
entries: ['./src/index'], | ||
declaration: true, | ||
clean: true, | ||
failOnWarn: false, | ||
rollup: { | ||
emitCJS: true, | ||
}, | ||
externals: ['vite'], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "@viarotel-org/vite-plugin-path", | ||
"version": "0.7.4", | ||
"description": "一个用于 Vitejs 的插件,可以返回任意文件的绝对路径。", | ||
"author": "viarotel <[email protected]>", | ||
"license": "MIT", | ||
"homepage": "https://github.com/viarotel-org/packages/tree/main/packages/vite-plugin-path#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/viarotel-org/packages.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/viarotel-org/packages/issues" | ||
}, | ||
"keywords": [ | ||
"unocss", | ||
"preset", | ||
"shade", | ||
"color", | ||
"primary", | ||
"theme" | ||
], | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.mjs" | ||
}, | ||
"./*": "./dist/*", | ||
"./dist/*": "./dist/*", | ||
"./src/*": "./src/*" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.mjs", | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"scripts": { | ||
"build": "unbuild" | ||
}, | ||
"dependencies": { | ||
"vite": "^4.4.0" | ||
}, | ||
"devDependencies": { | ||
"unbuild": "latest" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { Plugin } from 'vite' | ||
|
||
export default function VitePluginPath(): Plugin { | ||
return { | ||
name: 'vite-plugin-path', | ||
transform(src, id) { | ||
if (id.endsWith('?path')) { | ||
const value = id.slice(0, -5) | ||
return `export default ${JSON.stringify(value)}` | ||
} | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2018", | ||
"module": "esnext", | ||
"lib": ["esnext", "dom"], | ||
"moduleResolution": "node", | ||
"esModuleInterop": true, | ||
"strict": true, | ||
"strictNullChecks": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"skipDefaultLibCheck": true, | ||
"jsx": "preserve", | ||
"types": ["node", "vite/client"], | ||
"paths": {} | ||
}, | ||
"exclude": [ | ||
"**/dist/**", | ||
"**/node_modules/**", | ||
"**/client/**", | ||
"**/playground/**", | ||
"**/examples/**", | ||
"**/interactive/**", | ||
"**/test/dts/**" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters