|
4 | 4 | "description": "A function that tells you whether a given element is overflowing its container or not. Useful for creating dropdowns and tooltips.", |
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": "src/index.ts", |
8 | 9 | "sideEffects": false, |
9 | 10 | "scripts": { |
10 | 11 | "build": "yarn build-esm && yarn build-cjs", |
11 | | - "build-esm": "BABEL_ENV=production-esm babel src -d dist/esm --ignore \"**/*.spec.js\"", |
12 | | - "build-cjs": "BABEL_ENV=production-cjs babel src -d dist/cjs --ignore \"**/*.spec.js\"", |
| 12 | + "build-esm": "tsc --project tsconfig.build.json --outDir dist/esm --module esnext", |
| 13 | + "build-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs", |
13 | 14 | "clean": "rimraf dist", |
14 | 15 | "lint": "eslint src", |
15 | 16 | "postinstall": "husky install", |
16 | 17 | "prepack": "yarn clean && yarn build", |
17 | 18 | "prettier": "prettier --check . --cache", |
18 | | - "test": "yarn lint && yarn prettier" |
| 19 | + "test": "yarn lint && yarn tsc && yarn prettier", |
| 20 | + "tsc": "tsc --noEmit" |
19 | 21 | }, |
20 | 22 | "keywords": [ |
21 | 23 | "collision", |
|
31 | 33 | "@babel/cli": "^7.15.0", |
32 | 34 | "@babel/core": "^7.15.0", |
33 | 35 | "@babel/preset-env": "^7.15.0", |
| 36 | + "@babel/preset-typescript": "^7.18.6", |
| 37 | + "@typescript-eslint/eslint-plugin": "^5.41.0", |
| 38 | + "@typescript-eslint/parser": "^5.44.0", |
34 | 39 | "eslint": "^8.26.0", |
35 | 40 | "eslint-config-wojtekmaj": "^0.7.1", |
36 | 41 | "husky": "^8.0.0", |
37 | 42 | "prettier": "^2.7.0", |
38 | 43 | "pretty-quick": "^3.1.0", |
39 | | - "rimraf": "^3.0.0" |
| 44 | + "rimraf": "^3.0.0", |
| 45 | + "typescript": "^4.9.4" |
40 | 46 | }, |
41 | 47 | "resolutions": { |
42 | 48 | |
|
0 commit comments