Skip to content

Commit f72b9d1

Browse files
committed
fix: add version
1 parent b1b7a74 commit f72b9d1

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-function-api-extra",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"main": "dist/vue-function-api-extra.common.js",
55
"unpkg": "dist/vue-function-api-extra.js",
66
"repository": "https://github.com/chrisbing/vue-function-api-extra.git",
@@ -18,6 +18,7 @@
1818
"module": "dist/vue-function-api-extra.esm.js",
1919
"devDependencies": {
2020
"rollup": "^1.19.4",
21+
"rollup-plugin-json": "^4.0.0",
2122
"rollup-plugin-typescript": "^1.0.1",
2223
"typescript": "^3.5.3",
2324
"vue": "^2.6.10",

rollup.config.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
import typescript from 'rollup-plugin-typescript';
2+
import json from 'rollup-plugin-json'
23

34
const generateConfig = (format, filename) => {
45
return {
56
input: 'src/index.ts',
67
output: {
78
file: `dist/${filename}`,
89
format: format,
9-
name: 'VueFunctionApiExtra',
10+
name: 'vueFunctionApiExtra',
11+
globals: {
12+
'vue-function-api': "vueFunctionApi"
13+
}
1014
},
1115
plugins: [
12-
typescript()
13-
]
16+
json(),
17+
typescript(),
18+
],
19+
external: ['vue-function-api']
1420
}
1521
}
1622

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
import {version} from "../package.json"
2+
3+
export {
4+
version
5+
}
6+
17
export * from './getters'
28
export * from './plugin'

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
/* Module Resolution Options */
4242
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
43+
"resolveJsonModule": true,
4344
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
4445
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
4546
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */

yarn.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ resolve@^1.10.0:
2828
dependencies:
2929
path-parse "^1.0.6"
3030

31+
rollup-plugin-json@^4.0.0:
32+
version "4.0.0"
33+
resolved "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e"
34+
dependencies:
35+
rollup-pluginutils "^2.5.0"
36+
3137
rollup-plugin-typescript@^1.0.1:
3238
version "1.0.1"
3339
resolved "https://registry.npm.taobao.org/rollup-plugin-typescript/download/rollup-plugin-typescript-1.0.1.tgz#86565033b714c3d1f3aba510aad3dc519f7091e9"

0 commit comments

Comments
 (0)