Skip to content

Commit 7219366

Browse files
committed
updated build process and dependencies
1. fixed commonjs import issues 2. bumped version 3. added necessary build tools so build works on both Windows and Unix systems. 4. added source maps
1 parent 3671346 commit 7219366

File tree

6 files changed

+292
-251
lines changed

6 files changed

+292
-251
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
],
99
"@babel/preset-react",
1010
"@babel/typescript"
11-
]
11+
],
12+
"sourceMaps": "inline"
1213
}

dist/index.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@darius_rosendahl/react-use-hoverintent",
3-
"version": "1.1.7",
2+
"name": "react-use-hoverintent",
3+
"version": "1.2.0",
44
"description": "React hook for hoverIntent",
55
"main": "dist/index.js",
66
"module": "dist/index.js",
@@ -15,8 +15,11 @@
1515
"author": "linlilulll@gmail.com",
1616
"license": "MIT",
1717
"devDependencies": {
18+
"@babel/cli": "^7.12.1",
1819
"@types/react": "^16.9.35",
20+
"copyfiles": "^2.4.0",
1921
"react": "^16.13.1",
22+
"rimraf": "^3.0.2",
2023
"typescript": "^3.9.2"
2124
},
2225
"repository": "https://github.com/llldar/react-use-hoverintent",
@@ -27,9 +30,10 @@
2730
"node_modules"
2831
],
2932
"scripts": {
30-
"build": "tsc && babel src --out-dir dist --extensions .ts,.tsx,.js,.jsx && cp package.json LICENSE.md README.md ./dist"
33+
"build": "rimraf dist && tsc --emitDeclarationOnly && babel src --out-dir dist --extensions .ts,.tsx && copyfiles package.json LICENSE.md README.md ./dist"
3134
},
3235
"dependencies": {
36+
"@babel/core": "^7.12.3",
3337
"@babel/preset-env": "^7.12.1",
3438
"@babel/preset-react": "^7.12.1",
3539
"@babel/preset-typescript": "^7.12.1"

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@darius_rosendahl/react-use-hoverintent",
3-
"version": "1.1.7",
2+
"name": "react-use-hoverintent",
3+
"version": "1.2.0",
44
"description": "React hook for hoverIntent",
55
"main": "dist/index.js",
66
"module": "dist/index.js",
@@ -15,8 +15,11 @@
1515
"author": "linlilulll@gmail.com",
1616
"license": "MIT",
1717
"devDependencies": {
18+
"@babel/cli": "^7.12.1",
1819
"@types/react": "^16.9.35",
20+
"copyfiles": "^2.4.0",
1921
"react": "^16.13.1",
22+
"rimraf": "^3.0.2",
2023
"typescript": "^3.9.2"
2124
},
2225
"repository": "https://github.com/llldar/react-use-hoverintent",
@@ -27,9 +30,10 @@
2730
"node_modules"
2831
],
2932
"scripts": {
30-
"build": "tsc && babel src --out-dir dist --extensions .ts,.tsx,.js,.jsx && cp package.json LICENSE.md README.md ./dist"
33+
"build": "rimraf dist && tsc --emitDeclarationOnly && babel src --out-dir dist --extensions .ts,.tsx && copyfiles package.json LICENSE.md README.md ./dist"
3134
},
3235
"dependencies": {
36+
"@babel/core": "^7.12.3",
3337
"@babel/preset-env": "^7.12.1",
3438
"@babel/preset-react": "^7.12.1",
3539
"@babel/preset-typescript": "^7.12.1"

0 commit comments

Comments
 (0)