|
8 | 8 | }, |
9 | 9 | "license": "ISC", |
10 | 10 | "type": "module", |
11 | | - "main": "src/index.js", |
12 | | - "module": "src/index.js", |
| 11 | + "main": "dist/index.js", |
| 12 | + "module": "dist/index.js", |
13 | 13 | "jsdelivr": "dist/plot.umd.min.js", |
14 | 14 | "unpkg": "dist/plot.umd.min.js", |
15 | 15 | "exports": { |
| 16 | + "mocha": "./src/index.js", |
16 | 17 | "umd": "./dist/plot.umd.min.js", |
17 | | - "default": "./src/index.js" |
| 18 | + "default": "./dist/index.js" |
18 | 19 | }, |
19 | 20 | "repository": { |
20 | 21 | "type": "git", |
|
25 | 26 | "src/**/*.js" |
26 | 27 | ], |
27 | 28 | "scripts": { |
28 | | - "test": "mkdir -p test/output && mocha -r module-alias/register 'test/**/*-test.js' test/plot.js && eslint src test", |
29 | | - "prepublishOnly": "rm -rf dist && rollup -c", |
| 29 | + "test": "yarn test:typecheck && yarn test:lint && yarn test:mocha", |
| 30 | + "test:mocha": "mkdir -p test/output && mocha --conditions=mocha", |
| 31 | + "test:lint": "eslint src test", |
| 32 | + "test:typecheck": "tsc --noEmit", |
| 33 | + "prepublishOnly": "rm -rf dist && rollup -c && tsc", |
30 | 34 | "postpublish": "git push && git push --tags", |
31 | 35 | "dev": "vite" |
32 | 36 | }, |
|
38 | 42 | "@rollup/plugin-commonjs": "22", |
39 | 43 | "@rollup/plugin-json": "4", |
40 | 44 | "@rollup/plugin-node-resolve": "13", |
| 45 | + "@rollup/plugin-typescript": "^8.3.2", |
| 46 | + "@types/d3": "^7.4.0", |
| 47 | + "@types/expect": "^24.3.0", |
| 48 | + "@types/mocha": "^9.1.1", |
| 49 | + "@types/node": "^17.0.35", |
| 50 | + "@typescript-eslint/eslint-plugin": "^5.25.0", |
| 51 | + "@typescript-eslint/parser": "^5.25.0", |
41 | 52 | "canvas": "2", |
42 | | - "eslint": "8", |
| 53 | + "eslint": "^8.16.0", |
| 54 | + "glob": "^8.0.3", |
43 | 55 | "htl": "0.3", |
44 | 56 | "js-beautify": "1", |
45 | 57 | "jsdom": "19", |
46 | 58 | "mocha": "10", |
47 | 59 | "module-alias": "2", |
48 | 60 | "rollup": "2", |
49 | 61 | "rollup-plugin-terser": "7", |
| 62 | + "ts-node": "^10.8.0", |
| 63 | + "tslib": "^2.4.0", |
| 64 | + "typescript": "^4.6.4", |
| 65 | + "typescript-module-alias": "^1.0.2", |
50 | 66 | "vite": "2" |
51 | 67 | }, |
52 | 68 | "dependencies": { |
|
0 commit comments