|
2 | 2 | "name": "react-youtube", |
3 | 3 | "version": "1.0.0-semantic-release", |
4 | 4 | "description": "React.js powered YouTube player component", |
5 | | - "main": "dist/index.js", |
6 | | - "module": "dist/index.esm.js", |
7 | | - "types": "index.d.ts", |
| 5 | + "main": "dist/YouTube.js", |
| 6 | + "module": "dist/YouTube.mjs", |
| 7 | + "types": "dist/YouTube.d.ts", |
| 8 | + "targets": { |
| 9 | + "main": false, |
| 10 | + "module": false, |
| 11 | + "types": false |
| 12 | + }, |
| 13 | + "sideEffects": false, |
8 | 14 | "files": [ |
9 | | - "dist", |
10 | | - "index.d.ts" |
| 15 | + "dist/**" |
11 | 16 | ], |
12 | 17 | "repository": { |
13 | 18 | "type": "git", |
|
31 | 36 | "youtube-player": "5.5.2" |
32 | 37 | }, |
33 | 38 | "devDependencies": { |
34 | | - "@babel/cli": "7.17.6", |
35 | | - "@babel/core": "7.17.9", |
36 | | - "@babel/plugin-proposal-class-properties": "7.16.7", |
37 | | - "@babel/preset-env": "7.16.11", |
38 | | - "@babel/preset-react": "7.16.7", |
39 | 39 | "@commitlint/cli": "16.2.3", |
40 | 40 | "@commitlint/config-conventional": "16.2.1", |
41 | 41 | "@testing-library/jest-dom": "5.16.4", |
42 | 42 | "@testing-library/react": "12.1.4", |
| 43 | + "@types/jest": "27.4.1", |
43 | 44 | "@types/youtube-player": "5.5.6", |
44 | | - "babel-eslint": "10.1.0", |
45 | | - "babel-jest": "27.5.1", |
46 | | - "babel-loader": "8.2.4", |
47 | 45 | "commitizen": "4.2.4", |
48 | 46 | "cross-env": "7.0.3", |
49 | 47 | "cz-conventional-changelog": "3.3.0", |
50 | 48 | "eslint": "8.13.0", |
51 | 49 | "eslint-config-prettier": "8.5.0", |
52 | 50 | "eslint-config-react-app": "7.0.0", |
53 | | - "eslint-plugin-flowtype": "8.0.3", |
54 | | - "eslint-plugin-import": "2.26.0", |
55 | | - "eslint-plugin-jsx-a11y": "6.5.1", |
56 | 51 | "eslint-plugin-prettier": "4.0.0", |
57 | | - "eslint-plugin-react": "7.29.4", |
58 | | - "eslint-plugin-react-hooks": "4.4.0", |
59 | 52 | "husky": "7.0.4", |
60 | 53 | "jest": "27.5.1", |
61 | 54 | "lint-staged": "12.3.7", |
62 | | - "npm-run-all": "4.1.5", |
63 | | - "parcel-bundler": "1.12.5", |
| 55 | + "parcel": "2.4.1", |
64 | 56 | "prettier": "2.6.2", |
| 57 | + "process": "0.11.10", |
65 | 58 | "react": "17.0.2", |
66 | 59 | "react-dom": "17.0.2", |
67 | | - "semantic-release": "19.0.2" |
| 60 | + "ts-jest": "27.1.4", |
| 61 | + "tsup": "5.12.4", |
| 62 | + "typescript": "4.6.3" |
68 | 63 | }, |
69 | 64 | "peerDependencies": { |
70 | 65 | "react": ">=0.14.1" |
|
75 | 70 | "scripts": { |
76 | 71 | "test": "jest", |
77 | 72 | "test:ci": "jest --ci --runInBand", |
78 | | - "compile:cjs": "babel src/YouTube.js --out-file dist/index.js", |
79 | | - "compile:es": "cross-env BABEL_ENV=es babel src/YouTube.js --out-file dist/index.esm.js", |
80 | | - "compile": "npm-run-all --parallel compile:*", |
| 73 | + "compile": "tsup src/YouTube.tsx --format esm,cjs --dts --external react", |
81 | 74 | "prepublishOnly": "npm run compile", |
82 | | - "lint": "eslint src example", |
| 75 | + "lint": "eslint src example --ext .ts,.tsx,.js,.jsx", |
83 | 76 | "example": "parcel example/index.html --public-url /react-youtube/ --open", |
84 | | - "example:build": "parcel build example/index.html --public-url /react-youtube/ --out-dir build", |
| 77 | + "example:build": "parcel build example/index.html --public-url /react-youtube/ --dist-dir build", |
85 | 78 | "commit": "git-cz", |
86 | 79 | "prepare": "husky install" |
87 | 80 | }, |
88 | 81 | "lint-staged": { |
89 | | - "*.js": "eslint --fix", |
| 82 | + "*.js": "eslint --ext .ts,.tsx,.js,.jsx --fix", |
90 | 83 | "*.{html,json}": "prettier --write" |
91 | 84 | }, |
92 | 85 | "config": { |
|
95 | 88 | } |
96 | 89 | }, |
97 | 90 | "jest": { |
98 | | - "testEnvironment": "jsdom" |
| 91 | + "testEnvironment": "jsdom", |
| 92 | + "preset": "ts-jest" |
99 | 93 | } |
100 | 94 | } |
0 commit comments