Skip to content

Commit 947e54c

Browse files
author
fanwei
committed
chore: publish v1.1.6
1 parent 7c72fd5 commit 947e54c

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ router.push('/login');
2525

2626
## ✨ API
2727
### vue2-helpers
28-
|Declaration|Description|
28+
|Features|Description|
2929
|-|-|
30-
|`createVuexHelpers`&lt;<br>&nbsp;&nbsp;&nbsp;&nbsp;RootState, RootGetters, RootMutations, RootActions<br>&gt;(): {<br>&nbsp;&nbsp;&nbsp;&nbsp;`useState`, `useGetters`, `useMutations`, `useActions`<br>}|The helper methods in return value are used to replace `mapState`, `mapGetters`, `mapMutations`, `mapActions`|
30+
|`createVuexHelpers`&lt;<br>&nbsp;&nbsp;&nbsp;&nbsp;RootState, RootGetters, RootMutations, RootActions<br>&gt;(): {<br>&nbsp;&nbsp;&nbsp;&nbsp;`useState`, `useGetters`, `useMutations`, `useActions`<br>}|The helper methods in return value are<br>used to replace `mapState`, `mapGetters`,<br>`mapMutations`, `mapActions`|
3131

3232
### vue2-helpers/vuex
33-
|Declaration|Description|
33+
|Features|Description|
3434
|-|-|
3535
|`createStore`&lt;S&gt;(options: StoreOptions&lt;S&gt;): Store&lt;S&gt;||
3636
|`useStore`&lt;S = any&gt;(): Store&lt;S&gt;|
3737

3838
### vue2-helpers/vue-router
39-
|Declaration|Description|
39+
|Features|Description|
4040
|-|-|
4141
|`createRouter`(options: RouterOptions): Router||
4242
|`onBeforeRouteLeave`(leaveGuard: NavigationGuard): void||

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
22
"name": "vue2-helpers",
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"description": "A util package to use Vue 2 with Composition API easily",
5-
"author": "Ambit Tsai <[email protected]>",
5+
"author": {
6+
"name": "Ambit Tsai",
7+
"email": "[email protected]"
8+
},
69
"license": "Apache-2.0",
710
"main": "index.js",
811
"scripts": {
@@ -21,6 +24,11 @@
2124
"vue-router": "^3",
2225
"vuex": "^3"
2326
},
27+
"peerDependenciesMeta": {
28+
"vuex": {
29+
"optional": true
30+
}
31+
},
2432
"devDependencies": {
2533
"@rollup/plugin-typescript": "^8.2.3",
2634
"@vue/composition-api": "^1.0.4",

scripts/banner.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
const fs = require('fs')
2-
const path = require('path')
3-
4-
5-
const filePath = path.resolve(__dirname, '../package.json')
6-
const fileText = fs.readFileSync(filePath, 'utf8')
7-
const config = JSON.parse(fileText)
8-
1+
const pkg = require('../package.json');
92

103
module.exports = `
114
/**
12-
* ${config.name}@${config.version}
13-
* ${config.description}
14-
* @author ${config.author}
15-
* @license ${config.license}
16-
* @see {@link ${config.homepage}}
17-
*/`
5+
* ${pkg.name}@${pkg.version}
6+
* ${pkg.description}
7+
* @author ${pkg.author.name} <${pkg.author.email}>
8+
* @license ${pkg.license}
9+
* @see {@link ${pkg.homepage}}
10+
*/`

0 commit comments

Comments
 (0)