|
42 | 42 | "standard-version": "^4.2.0", |
43 | 43 | "storybook-readme": "^3.1.1", |
44 | 44 | "style-loader": "^0.19.0", |
| 45 | + "typescript": "^2.6.2", |
45 | 46 | "validate-commit-msg": "^2.14.0" |
46 | 47 | }, |
47 | | - "files": [ |
48 | | - "lib" |
49 | | - ], |
| 48 | + "files": ["lib", "types/index.d.ts"], |
| 49 | + "types": "types/index.d.ts", |
50 | 50 | "homepage": "https://github.com/researchgate/react-intersection-observer#readme", |
51 | | - "keywords": [ |
52 | | - "Intersection", |
53 | | - "Observer", |
54 | | - "react", |
55 | | - "component", |
56 | | - "viewport", |
57 | | - "visible", |
58 | | - "invisible", |
59 | | - "researchgate" |
60 | | - ], |
| 51 | + "keywords": ["Intersection", "Observer", "react", "component", "viewport", "visible", "invisible", "researchgate"], |
61 | 52 | "license": "MIT", |
62 | 53 | "lint-staged": { |
63 | | - "{src,docs/docs}/**/*.js": [ |
64 | | - "eslint --fix", |
65 | | - "git add" |
66 | | - ] |
| 54 | + "{src,docs/docs}/**/*.js": ["eslint --fix", "git add"] |
67 | 55 | }, |
68 | 56 | "main": "lib/js/index.js", |
69 | 57 | "module": "lib/es/index.js", |
70 | 58 | "peerDependencies": { |
71 | | - "react": "^15.4.0 || ^16.0.0", |
72 | | - "react-dom": "^15.4.0 || ^16.0.0" |
| 59 | + "react": ">=15", |
| 60 | + "react-dom": ">=15" |
73 | 61 | }, |
74 | 62 | "repository": { |
75 | 63 | "type": "git", |
76 | 64 | "url": "https://github.com/researchgate/react-intersection-observer" |
77 | 65 | }, |
78 | 66 | "jest": { |
79 | 67 | "rootDir": "src", |
80 | | - "testMatch": [ |
81 | | - "**/__tests__/**/*.spec.js" |
82 | | - ], |
83 | | - "setupFiles": [ |
84 | | - "raf/polyfill" |
85 | | - ] |
| 68 | + "testMatch": ["**/__tests__/**/*.spec.js"], |
| 69 | + "setupFiles": ["raf/polyfill"] |
86 | 70 | }, |
87 | 71 | "scripts": { |
88 | 72 | "build": "yarn build:js && yarn build:es", |
89 | | - "build:js": "cross-env BABEL_ENV=production BABEL_OUTPUT=cjs babel src --out-dir lib/js --ignore __tests__ --copy-files", |
90 | | - "build:es": "cross-env BABEL_ENV=production BABEL_OUTPUT=esm babel src --out-dir lib/es --ignore __tests__ --copy-files", |
| 73 | + "build:js": |
| 74 | + "cross-env BABEL_ENV=production BABEL_OUTPUT=cjs babel src --out-dir lib/js --ignore __tests__ --copy-files", |
| 75 | + "build:es": |
| 76 | + "cross-env BABEL_ENV=production BABEL_OUTPUT=esm babel src --out-dir lib/es --ignore __tests__ --copy-files", |
91 | 77 | "build:storybook": "build-storybook --output-dir docs", |
92 | 78 | "clear": "rimraf ./lib", |
93 | 79 | "commitmsg": "validate-commit-msg", |
94 | 80 | "coverage": "yarn test -- --coverage", |
95 | 81 | "create-github-release": "conventional-github-releaser -p angular", |
96 | 82 | "format": "eslint --fix {src,docs/docs}/**/*.js", |
97 | | - "lint": "eslint {src,docs/docs}/.", |
| 83 | + "lint": "eslint {src,docs/docs}/. && tsc --project types", |
98 | 84 | "precommit": "yarn lint-staged && yarn test", |
99 | 85 | "prepare": "yarn clear && yarn build", |
100 | 86 | "prepublishOnly": "yarn test", |
|
0 commit comments