|
24 | 24 | }, |
25 | 25 | "type": "module", |
26 | 26 | "main": "dist/docsify.js", |
| 27 | + "types": "src/core/Docsify.d.ts", |
27 | 28 | "exports": { |
28 | 29 | ".": "./src/core/Docsify.js", |
29 | 30 | "./*": "./*" |
30 | 31 | }, |
31 | 32 | "files": [ |
32 | | - "dist" |
| 33 | + "dist", |
| 34 | + "src" |
33 | 35 | ], |
34 | 36 | "lint-staged": { |
35 | 37 | "*.js": "eslint --fix" |
36 | 38 | }, |
37 | 39 | "dependencies": { |
| 40 | + "common-tags": "^1.8.0", |
38 | 41 | "dexie": "^4.0.11", |
| 42 | + "marked": "^16.0.0", |
39 | 43 | "medium-zoom": "^1.1.0", |
40 | 44 | "opencollective-postinstall": "^2.0.2", |
41 | 45 | "prismjs": "^1.29.0", |
|
51 | 55 | "@rollup/plugin-node-resolve": "^16.0.0", |
52 | 56 | "@rollup/plugin-replace": "^6.0.1", |
53 | 57 | "@rollup/plugin-terser": "^0.4.3", |
| 58 | + "@types/common-tags": "^1.8.4", |
54 | 59 | "@types/eslint": "^8.40.2", |
| 60 | + "@types/prismjs": "^1.26.5", |
55 | 61 | "axios": "^1.5.0", |
56 | 62 | "browser-sync": "^3.0.2", |
57 | | - "common-tags": "^1.8.0", |
58 | 63 | "conventional-changelog-cli": "^3.0.0", |
59 | 64 | "cross-env": "^10.0.0", |
60 | 65 | "cssnano": "^7.0.1", |
|
69 | 74 | "jest": "^30.0.4", |
70 | 75 | "jest-environment-jsdom": "^30.0.5", |
71 | 76 | "lint-staged": "^16.1.0", |
72 | | - "marked": "^16.0.0", |
73 | 77 | "npm-run-all": "^4.1.5", |
74 | 78 | "postcss-cli": "^11.0.0", |
75 | 79 | "postcss-import": "^16.1.0", |
|
78 | 82 | "rimraf": "^6.1.0", |
79 | 83 | "rollup": "^4.17.2", |
80 | 84 | "rollup-plugin-import-css": "^4.0.1", |
| 85 | + "typescript": "^5.9.3", |
81 | 86 | "vue": "^3.4.27", |
82 | 87 | "xhr-mock": "^2.5.1" |
83 | 88 | }, |
|
87 | 92 | "build:css:min": "cross-env NODE_ENV='production' npm run build:css -- --ext .min.css", |
88 | 93 | "build:emoji": "node ./build/emoji.js", |
89 | 94 | "build:js": "rollup -c", |
90 | | - "build": "run-s clean build:js build:css build:css:min build:cover", |
91 | | - "clean": "rimraf --glob dist/** themes/** _playwright*/**", |
| 95 | + "build:types": "tsc", |
| 96 | + "build": "run-s clean build:types build:js build:css build:css:min build:cover", |
| 97 | + "clean": "rimraf --glob \"dist/**\" \"themes/**\" \"_playwright*/**\" \"src/**/*.d.ts\" \"src/**/*.d.ts.map\"", |
92 | 98 | "dev": "run-p serve:dev watch:*", |
93 | 99 | "docker:build:test": "npm run docker:cli -- build:test", |
94 | 100 | "docker:build": "docker build -f Dockerfile -t docsify-test:local .", |
|
111 | 117 | "test:e2e": "playwright test", |
112 | 118 | "test:e2e:chromium": "playwright test --project='chromium'", |
113 | 119 | "test:e2e:ui": "playwright test --ui", |
| 120 | + "test:e2e:consume-types": "echo TODO: test the consume-types example with ESM modules", |
114 | 121 | "test:integration": "npm run test:jest -- --selectProjects integration", |
115 | 122 | "test:jest": "cross-env NODE_OPTIONS=--experimental-vm-modules jest", |
116 | 123 | "test:unit": "npm run test:jest -- --selectProjects unit", |
117 | 124 | "test:update:snapshot": "npm run test:jest -- --updateSnapshot", |
118 | | - "test": "run-s test:jest test:e2e", |
| 125 | + "test:consume-types": "cd test/consume-types && npm clean-install --install-links && npm run typecheck", |
| 126 | + "test": "run-s test:jest test:e2e test:consume-types", |
| 127 | + "typecheck": "tsc --noEmit", |
| 128 | + "typecheck:watch": "tsc --noEmit --watch", |
119 | 129 | "watch:css": "run-p 'build:css -- --watch' 'build:css:min -- --watch'", |
120 | 130 | "watch:js": "npm run build:js -- --watch" |
121 | 131 | } |
|
0 commit comments