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