diff --git a/README.md b/README.md
index e24db84..64d518f 100644
--- a/README.md
+++ b/README.md
@@ -25,18 +25,18 @@ router.push('/login');
## ✨ API
### vue2-helpers
-|Declaration|Description|
+|Features|Description|
|-|-|
-|`createVuexHelpers`<
RootState, RootGetters, RootMutations, RootActions
>(): {
`useState`, `useGetters`, `useMutations`, `useActions`
}|The helper methods in return value are used to replace `mapState`, `mapGetters`, `mapMutations`, `mapActions`|
+|`createVuexHelpers`<
RootState, RootGetters, RootMutations, RootActions
>(): {
`useState`, `useGetters`, `useMutations`, `useActions`
}|The helper methods in return value are
used to replace `mapState`, `mapGetters`,
`mapMutations`, `mapActions`|
### vue2-helpers/vuex
-|Declaration|Description|
+|Features|Description|
|-|-|
|`createStore`<S>(options: StoreOptions<S>): Store<S>||
|`useStore`<S = any>(): Store<S>|
### vue2-helpers/vue-router
-|Declaration|Description|
+|Features|Description|
|-|-|
|`createRouter`(options: RouterOptions): Router||
|`onBeforeRouteLeave`(leaveGuard: NavigationGuard): void||
diff --git a/package.json b/package.json
index b1710c2..2084a28 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,11 @@
{
"name": "vue2-helpers",
- "version": "1.1.5",
+ "version": "1.1.6",
"description": "A util package to use Vue 2 with Composition API easily",
- "author": "Ambit Tsai ",
+ "author": {
+ "name": "Ambit Tsai",
+ "email": "ambit_tsai@qq.com"
+ },
"license": "Apache-2.0",
"main": "index.js",
"scripts": {
@@ -21,6 +24,11 @@
"vue-router": "^3",
"vuex": "^3"
},
+ "peerDependenciesMeta": {
+ "vuex": {
+ "optional": true
+ }
+ },
"devDependencies": {
"@rollup/plugin-typescript": "^8.2.3",
"@vue/composition-api": "^1.0.4",
diff --git a/scripts/banner.js b/scripts/banner.js
index 17091e8..77000db 100644
--- a/scripts/banner.js
+++ b/scripts/banner.js
@@ -1,17 +1,10 @@
-const fs = require('fs')
-const path = require('path')
-
-
-const filePath = path.resolve(__dirname, '../package.json')
-const fileText = fs.readFileSync(filePath, 'utf8')
-const config = JSON.parse(fileText)
-
+const pkg = require('../package.json');
module.exports = `
/**
- * ${config.name}@${config.version}
- * ${config.description}
- * @author ${config.author}
- * @license ${config.license}
- * @see {@link ${config.homepage}}
- */`
\ No newline at end of file
+ * ${pkg.name}@${pkg.version}
+ * ${pkg.description}
+ * @author ${pkg.author.name} <${pkg.author.email}>
+ * @license ${pkg.license}
+ * @see {@link ${pkg.homepage}}
+ */`