|
37 | 37 | "Charts"
|
38 | 38 | ],
|
39 | 39 | "sideEffects": false,
|
40 |
| - "main": "./src/index.js", |
41 |
| - "typings": "./dist/index.d.ts", |
| 40 | + "main": "./src/index.ts", |
| 41 | + "types": "./dist/index.d.ts", |
42 | 42 | "publishConfig": {
|
43 | 43 | "main": "./dist/index.cjs",
|
44 | 44 | "module": "./dist/index.js",
|
|
47 | 47 | "scripts": {
|
48 | 48 | "prepublishOnly": "pnpm test && pnpm build && del ./package && clean-publish",
|
49 | 49 | "postpublish": "del ./package",
|
50 |
| - "build": "rollup -c", |
| 50 | + "emitDeclarations": "tsc --emitDeclarationOnly", |
| 51 | + "build": "rollup -c & pnpm emitDeclarations", |
51 | 52 | "unit": "jest -c jest.config.json",
|
52 | 53 | "test": "pnpm lint && pnpm unit",
|
53 | 54 | "test:size": "size-limit",
|
54 |
| - "lint": "eslint --ext .js,.vue src test", |
| 55 | + "test:typings": "tsd", |
| 56 | + "lint": "eslint 'src/**/*.ts'", |
55 | 57 | "format": "prettier --write src test",
|
56 | 58 | "release": "standard-version",
|
57 | 59 | "docs:dev": "vuepress dev docs",
|
58 | 60 | "docs:build": "vuepress build docs",
|
59 | 61 | "commit": "cz",
|
60 |
| - "start:storybook": "start-storybook -p 6006" |
| 62 | + "start:storybook": "start-storybook -p 6006", |
| 63 | + "build:storybook": "del ./storybook-static; NODE_ENV=production build-storybook" |
61 | 64 | },
|
62 | 65 | "peerDependencies": {
|
63 | 66 | "chart.js": "^3.7.0"
|
|
75 | 78 | "@swc/core": "^1.2.120",
|
76 | 79 | "@swc/helpers": "^0.3.2",
|
77 | 80 | "@swc/jest": "^0.2.15",
|
| 81 | + "@types/jest": "^27.4.1", |
78 | 82 | "@vitejs/plugin-vue": "^2.2.2",
|
| 83 | + "@vue/eslint-config-typescript": "^10.0.0", |
79 | 84 | "@vue/test-utils": "^2.0.0-rc.17",
|
80 | 85 | "@vue/vue3-jest": "^27.0.0-alpha.4",
|
81 | 86 | "babel-jest": "^27.4.5",
|
|
106 | 111 | "simple-git-hooks": "^2.7.0",
|
107 | 112 | "size-limit": "^7.0.8",
|
108 | 113 | "standard-version": "^9.3.2",
|
| 114 | + "tsd": "^0.19.1", |
| 115 | + "typescript": "^4.6.2", |
109 | 116 | "vite": "^2.8.6",
|
110 | 117 | "vue": "^3.2.31",
|
111 | 118 | "vue-loader": "^17.0.0",
|
112 | 119 | "vuepress": "^0.14.4"
|
| 120 | + }, |
| 121 | + "tsd": { |
| 122 | + "directory": "./test" |
113 | 123 | }
|
114 | 124 | }
|
0 commit comments