|
2 | 2 | "name": "react-datetime-picker", |
3 | 3 | "version": "4.2.0", |
4 | 4 | "description": "A date range 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", |
| 8 | + "sideEffects": [ |
| 9 | + "*.css" |
| 10 | + ], |
7 | 11 | "scripts": { |
8 | 12 | "build": "yarn build-js && yarn copy-styles", |
9 | | - "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", |
10 | 16 | "clean": "rimraf dist", |
11 | 17 | "copy-styles": "node ./copy-styles.mjs", |
12 | 18 | "jest": "jest", |
13 | | - "lint": "eslint . --ext .js,.jsx", |
| 19 | + "lint": "eslint . --ext .js,.jsx,.ts,.tsx", |
14 | 20 | "postinstall": "husky install", |
15 | 21 | "prepack": "yarn clean && yarn build", |
16 | 22 | "prettier": "prettier --check . --cache", |
17 | | - "test": "yarn lint && yarn prettier && yarn jest" |
| 23 | + "test": "yarn lint && yarn tsc && yarn prettier && yarn jest", |
| 24 | + "tsc": "tsc --noEmit" |
18 | 25 | }, |
19 | 26 | "keywords": [ |
20 | 27 | "calendar", |
|
44 | 51 | "react-time-picker": "^5.2.0" |
45 | 52 | }, |
46 | 53 | "devDependencies": { |
47 | | - "@babel/cli": "^7.15.0", |
48 | 54 | "@babel/core": "^7.15.0", |
49 | 55 | "@babel/preset-env": "^7.15.0", |
50 | 56 | "@babel/preset-react": "^7.14.0", |
| 57 | + "@babel/preset-typescript": "^7.18.6", |
51 | 58 | "@testing-library/jest-dom": "^5.15.0", |
52 | 59 | "@testing-library/react": "^13.4.0", |
53 | 60 | "@testing-library/user-event": "^14.4.0", |
| 61 | + "@types/jest": "^29.0.0", |
| 62 | + "@typescript-eslint/eslint-plugin": "^5.41.0", |
| 63 | + "@typescript-eslint/parser": "^5.44.0", |
54 | 64 | "eslint": "^8.26.0", |
55 | 65 | "eslint-config-wojtekmaj": "^0.7.1", |
56 | 66 | "husky": "^8.0.0", |
|
60 | 70 | "pretty-quick": "^3.1.0", |
61 | 71 | "react": "^18.2.0", |
62 | 72 | "react-dom": "^18.2.0", |
63 | | - "rimraf": "^3.0.0" |
| 73 | + "rimraf": "^3.0.0", |
| 74 | + "typescript": "^4.9.5" |
64 | 75 | }, |
65 | 76 | "peerDependencies": { |
66 | 77 | "react": "^16.8.0 || ^17.0.0 || ^18.0.0", |
|
0 commit comments