Skip to content

Commit df02162

Browse files
author
Michael Kryvoruchko
committed
feat: update naming and types
1 parent 63193ee commit df02162

File tree

6 files changed

+19
-21
lines changed

6 files changed

+19
-21
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can import all these properties from the `gitart-manage-vue-dialog` module.
99

1010
- `gitartDialogInjectionKey` - vue injection key for the dialog controller
1111
- `gitartDialogPlugin` - vue plugin. Usage below
12-
- `DialogSpawn` - component to use with plugin. Usage below
12+
- `GDialogSpawn` - component to use with plugin. Usage below
1313
- `IGDialog` - read the codebase for more information
1414
- `IGDialogItem` - read the codebase for more information
1515
- `useDialogConfirm` - read the codebase for more information
@@ -20,11 +20,11 @@ You can import all these properties from the `gitart-manage-vue-dialog` module.
2020

2121
App.vue
2222
```ts
23-
import { DialogSpawn } from 'gitart-manage-vue-dialog'
23+
import { GDialogSpawn } from 'gitart-manage-vue-dialog'
2424
```
2525

2626
```html
27-
<DialogSpawn />
27+
<GDialogSpawn />
2828
```
2929

3030
main.ts

build.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const resolve = (str: string) => path.resolve(fileURLToPath(new URL('./', import
88
export default defineBuildConfig({
99
entries: [
1010
{
11-
name: 'dialog',
11+
name: 'index',
1212
input: resolve('src/index'),
1313
},
1414
],

package.json

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
{
22
"name": "gitart-manage-vue-dialog",
3-
"version": "0.0.1",
3+
"version": "0.0.4",
44
"description": "RegData Shared Utilities",
55
"type": "module",
6-
"main": "./src/index.js",
7-
"module": "./src/index.js",
6+
"main": "./dist/index.mjs",
7+
"module": "./dist/index.mjs",
8+
"types": "./dist/index.d.ts",
89
"exports": {
9-
".": "./dist/dialog.mjs",
10+
".": {
11+
"default": "./dist/index.mjs",
12+
"types": "./dist/index.d.ts",
13+
"import": "./dist/index.mjs",
14+
"require": "./dist/index.cjs"
15+
},
1016
"./package.json": "./package.json"
1117
},
12-
"typesVersions": {
13-
"*": {
14-
".": [
15-
"dist/dialog.d.ts"
16-
]
17-
}
18-
},
1918
"files": [
2019
"./dist"
2120
],

src/RDialogSpawn.ts src/GDialogSpawn.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { defineComponent, h, inject } from 'vue'
32

43
import {

src/dialog.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { mount } from '@vue/test-utils'
33
import { defineComponent, h } from 'vue'
44

55
import {
6-
RDialogSpawn,
6+
GDialogSpawn,
77
gitartDialogPlugin,
88
useGDialog,
99
} from './index'
@@ -69,7 +69,7 @@ describe('dialog plugin', () => {
6969
return () => {
7070
return [
7171
h('div'),
72-
h(RDialogSpawn),
72+
h(GDialogSpawn),
7373
]
7474
}
7575
})
@@ -109,7 +109,7 @@ describe('dialog plugin', () => {
109109
return () => {
110110
return [
111111
h('div'),
112-
h(RDialogSpawn),
112+
h(GDialogSpawn),
113113
]
114114
}
115115
})

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import RDialogSpawn from './RDialogSpawn'
1+
import GDialogSpawn from './GDialogSpawn'
22

33
import {
44
gitartDialogPlugin,
@@ -10,7 +10,7 @@ import {
1010

1111
export {
1212
gitartDialogPlugin,
13-
RDialogSpawn,
13+
GDialogSpawn,
1414
gitartDialogInjectionKey,
1515
}
1616

0 commit comments

Comments
 (0)