|
7 | 7 | "author": "Tobias Koppers @sokra",
|
8 | 8 | "homepage": "https://github.com/webpack/webpack-dev-middleware",
|
9 | 9 | "bugs": "https://github.com/webpack/webpack-dev-middleware/issues",
|
10 |
| - "main": "dist/cjs.js", |
11 | 10 | "funding": {
|
12 | 11 | "type": "opencollective",
|
13 | 12 | "url": "https://opencollective.com/webpack"
|
14 | 13 | },
|
| 14 | + "main": "dist/cjs.js", |
| 15 | + "types": "types/cjs.d.ts", |
15 | 16 | "engines": {
|
16 | 17 | "node": ">= 12.13.0"
|
17 | 18 | },
|
18 | 19 | "scripts": {
|
19 | 20 | "commitlint": "commitlint --from=master",
|
20 | 21 | "fmt:check": "prettier \"{**/*,*}.{js,json,md,yml,css}\" --list-different",
|
21 | 22 | "lint:js": "eslint --cache src test",
|
| 23 | + "lint:types": "tsc --pretty --noEmit", |
22 | 24 | "lint": "npm-run-all lint:js fmt:check",
|
23 | 25 | "fmt": "npm run fmt:check -- --write",
|
24 | 26 | "fix:js": "npm run lint:js -- --fix",
|
25 | 27 | "fix": "npm-run-all fix:js fmt",
|
26 | 28 | "prepare": "husky install && npm run build",
|
27 |
| - "build": "del dist && babel src -d dist --copy-files", |
| 29 | + "build:types": "tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write", |
| 30 | + "build:code": "cross-env NODE_ENV=production babel src -d dist --copy-files", |
| 31 | + "build": "npm-run-all -p \"build:**\"", |
28 | 32 | "release": "standard-version",
|
29 | 33 | "security": "npm audit --production",
|
30 | 34 | "test:only": "cross-env NODE_ENV=test jest",
|
|
34 | 38 | "test": "npm run test:coverage"
|
35 | 39 | },
|
36 | 40 | "files": [
|
37 |
| - "dist" |
| 41 | + "dist", |
| 42 | + "types" |
38 | 43 | ],
|
39 | 44 | "peerDependencies": {
|
40 | 45 | "webpack": "^4.0.0 || ^5.0.0"
|
|
52 | 57 | "@babel/preset-env": "^7.14.7",
|
53 | 58 | "@commitlint/cli": "^15.0.0",
|
54 | 59 | "@commitlint/config-conventional": "^15.0.0",
|
| 60 | + "@types/connect": "^3.4.35", |
| 61 | + "@types/express": "^4.17.13", |
| 62 | + "@types/mime-types": "^2.1.1", |
55 | 63 | "@webpack-contrib/eslint-config-webpack": "^3.0.0",
|
56 | 64 | "babel-jest": "^27.0.6",
|
57 | 65 | "chokidar": "^3.5.1",
|
|
0 commit comments