|
2 | 2 | "name": "react-date-picker",
|
3 | 3 | "version": "9.2.0",
|
4 | 4 | "description": "A date picker for your React app.",
|
5 |
| - "main": "dist/index.js", |
| 5 | + "main": "dist/cjs/index.js", |
| 6 | + "module": "dist/esm/index.js", |
6 | 7 | "source": "src/index.js",
|
7 |
| - "types": "./index.d.ts", |
| 8 | + "sideEffects": [ |
| 9 | + "*.css" |
| 10 | + ], |
8 | 11 | "scripts": {
|
9 | 12 | "build": "yarn build-js && yarn copy-styles",
|
10 |
| - "build-js": "babel src -d dist --ignore \"**/*.spec.js,**/*.spec.jsx\"", |
| 13 | + "build-js": "yarn build-js-esm && yarn build-js-cjs", |
| 14 | + "build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext", |
| 15 | + "build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs", |
11 | 16 | "clean": "rimraf dist",
|
12 | 17 | "copy-styles": "node ./copy-styles.mjs",
|
13 | 18 | "jest": "jest",
|
14 |
| - "lint": "eslint . --ext .js,.jsx", |
| 19 | + "lint": "eslint . --ext .js,.jsx,.ts,.tsx", |
15 | 20 | "postinstall": "husky install",
|
16 | 21 | "prepack": "yarn clean && yarn build",
|
17 | 22 | "prettier": "prettier --check . --cache",
|
18 |
| - "test": "yarn lint && yarn prettier && yarn jest" |
| 23 | + "test": "yarn lint && yarn tsc && yarn prettier && yarn jest", |
| 24 | + "tsc": "tsc --noEmit" |
19 | 25 | },
|
20 | 26 | "keywords": [
|
21 | 27 | "calendar",
|
|
41 | 47 | "update-input-width": "^1.2.2"
|
42 | 48 | },
|
43 | 49 | "devDependencies": {
|
44 |
| - "@babel/cli": "^7.15.0", |
45 | 50 | "@babel/core": "^7.15.0",
|
46 | 51 | "@babel/preset-env": "^7.15.0",
|
47 | 52 | "@babel/preset-react": "^7.14.0",
|
| 53 | + "@babel/preset-typescript": "^7.18.6", |
48 | 54 | "@testing-library/jest-dom": "^5.15.0",
|
49 | 55 | "@testing-library/react": "^13.4.0",
|
50 | 56 | "@testing-library/user-event": "^14.4.0",
|
| 57 | + "@types/jest": "^29.0.0", |
| 58 | + "@typescript-eslint/eslint-plugin": "^5.41.0", |
| 59 | + "@typescript-eslint/parser": "^5.44.0", |
51 | 60 | "eslint": "^8.26.0",
|
52 | 61 | "eslint-config-wojtekmaj": "^0.7.1",
|
53 | 62 | "husky": "^8.0.0",
|
|
57 | 66 | "pretty-quick": "^3.1.0",
|
58 | 67 | "react": "^18.2.0",
|
59 | 68 | "react-dom": "^18.2.0",
|
60 |
| - "rimraf": "^3.0.0" |
| 69 | + "rimraf": "^3.0.0", |
| 70 | + "typescript": "^4.9.5" |
61 | 71 | },
|
62 | 72 | "peerDependencies": {
|
63 | 73 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
0 commit comments