Skip to content

Commit 1dc5c50

Browse files
committed
chore: update
1 parent 7337ce4 commit 1dc5c50

File tree

7 files changed

+36
-122
lines changed

7 files changed

+36
-122
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ npm i vue3-right-click-menu
1212
## Usage
1313
```
1414
// 引入样式
15-
import 'vue3-right-click-menu/index.css'
15+
import 'vue3-right-click-menu/style.css'
1616
// 注册组件
1717
import { RightClick } from 'vue3-right-click-menu'
1818
app.component('vue-right-click', RightClick)

package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"types": "./dist/index.d.ts",
2222
"require": "./dist/index.js",
2323
"import": "./dist/index.mjs"
24-
}
24+
},
25+
"./style.css": "./dist/index.css"
2526
},
2627
"main": "./dist/index.js",
2728
"module": "./dist/index.mjs",
@@ -41,7 +42,7 @@
4142
"node": ">=14.6"
4243
},
4344
"scripts": {
44-
"build": "tsup ./src/index.ts --format cjs,esm --dts --clean --minify",
45+
"build": "tsup ./src/index.ts ./src/index.css --format cjs,esm --dts --clean --minify --external vue",
4546
"dev": "npm run build -- --watch src",
4647
"play": "pnpm run -C playground dev",
4748
"play:build": "pnpm run -C playground build",
@@ -56,10 +57,12 @@
5657
"prepublishOnly": "nr build",
5758
"release": "bumpp --commit --tag --push && git push origin --tags -f && npm publish"
5859
},
59-
"dependencies": {
60-
"@vueuse/core": "^9.0.0",
60+
"peerDependencies": {
6161
"vue": "^3.2.41"
6262
},
63+
"dependencies": {
64+
"@vueuse/core": "^9.0.0"
65+
},
6366
"devDependencies": {
6467
"@antfu/eslint-config": "^0.34.0",
6568
"@types/node": "^18.0.0",
@@ -76,7 +79,8 @@
7679
"typescript": "^4.8.4",
7780
"unocss": "^0.51.2",
7881
"vite": "^4.0.0",
79-
"vitest": "^0.13.1"
82+
"vitest": "^0.13.1",
83+
"vue3-right-click-menu": "workspace:^0.0.2"
8084
},
8185
"lint-staged": {
8286
"*": [

playground/components.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
declare module 'vue' {
66
export interface GlobalComponents {
7-
Aaa: typeof import('./src/components/aaa.vue')['default']
87
Counter: typeof import('./src/components/Counter.vue')['default']
98
Footer: typeof import('./src/components/Footer.vue')['default']
10-
RightClick: typeof import('./src/components/rightClick.vue')['default']
9+
RightClick: typeof import('./src/components/RightClick.vue')['default']
1110
}
1211
}
1312

playground/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import App from './App.vue'
55
import '@unocss/reset/tailwind.css'
66
import './styles/main.css'
77
import 'uno.css'
8-
import '../../dist/index.css'
8+
import 'vue3-right-click-menu/style.css'
99

1010
const app = createApp(App)
1111
const router = createRouter({

playground/src/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { RightClick } from '../../../dist'
2+
import { RightClick } from 'vue3-right-click-menu'
33
const menu = [
44
{ label: '新增', name: 'simon' },
55
{ label: '编辑', name: 'simon' },

pnpm-lock.yaml

Lines changed: 23 additions & 111 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
import './index.css'
21
export * from './types'
32
export * from './rightClick'

0 commit comments

Comments
 (0)