Skip to content

Commit 8ddfe36

Browse files
committed
Merge branch 'develop'
2 parents d45b4ef + 24ae1d0 commit 8ddfe36

File tree

10 files changed

+6995
-6594
lines changed

10 files changed

+6995
-6594
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
coverage
12
dist
23
example/dist
34
example/node_modules

.eslintrc.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"plugin:react/recommended",
3030
"plugin:jest/recommended",
3131
"plugin:eslint-comments/recommended",
32-
"plugin:prettier/recommended",
33-
"prettier/standard"
32+
"plugin:prettier/recommended"
3433
],
3534
"rules": {
3635
"prettier/prettier": "error",

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install lint-staged
5+
npm test

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: node_js
22
node_js:
33
- "node"
44
env:
5+
- HUSKY=0
56
- CODECOV_TOKEN="88b89344-8051-4bc1-aa42-f6428b99355b"
67
cache:
78
directories:

__tests__/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { configure } from 'enzyme';
2-
import Adapter from 'enzyme-adapter-react-16';
2+
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
33

44
configure({ adapter: new Adapter() });

example/package-lock.json

Lines changed: 2687 additions & 2618 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 4270 additions & 3929 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"prod": "npm run production",
1616
"watch": "NODE_ENV=local ./node_modules/.bin/rollup --config --watch",
1717
"lint": "./node_modules/.bin/eslint ./",
18-
"clean": "rm -rf dist"
18+
"clean": "rm -rf dist",
19+
"postinstall": "husky install"
1920
},
2021
"keywords": [
2122
"react",
@@ -31,8 +32,8 @@
3132
"url": "https://github.com/michaeldzjap/react-signature-pad-wrapper/issues"
3233
},
3334
"peerDependencies": {
34-
"react": "^15.5.0 || ^16.0.0 || ^17.0.0",
35-
"react-dom": "^15.5.0 || ^16.0.0 || ^17.0.0"
35+
"react": "^17.0.1",
36+
"react-dom": "^17.0.1"
3637
},
3738
"devDependencies": {
3839
"@babel/core": "^7.11.6",
@@ -42,42 +43,38 @@
4243
"@babel/preset-env": "^7.11.5",
4344
"@babel/preset-react": "^7.10.4",
4445
"@rollup/plugin-babel": "^5.2.1",
45-
"@rollup/plugin-commonjs": "^16.0.0",
46-
"@rollup/plugin-node-resolve": "^10.0.0",
46+
"@rollup/plugin-commonjs": "^17.0.0",
47+
"@rollup/plugin-node-resolve": "^11.0.1",
48+
"@wojtekmaj/enzyme-adapter-react-17": "^0.4.1",
4749
"babel-eslint": "^10.1.0",
4850
"babel-jest": "^26.3.0",
4951
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
5052
"canvas": "^2.6.1",
5153
"enzyme": "^3.11.0",
52-
"enzyme-adapter-react-16": "^1.15.4",
5354
"eslint": "^7.8.1",
54-
"eslint-config-prettier": "^6.11.0",
55+
"eslint-config-prettier": "^8.1.0",
5556
"eslint-plugin-eslint-comments": "^3.2.0",
5657
"eslint-plugin-import": "^2.22.0",
5758
"eslint-plugin-jest": "^24.0.0",
5859
"eslint-plugin-prettier": "^3.1.4",
5960
"eslint-plugin-react": "^7.20.6",
60-
"husky": "^4.3.0",
61+
"husky": "^5.1.1",
6162
"jest": "^26.4.2",
6263
"lint-staged": "^10.3.0",
6364
"prettier": "^2.1.1",
6465
"prettier-standard": "^16.4.1",
6566
"prop-types": "^15.7.2",
67+
"react": "*",
68+
"react-dom": "*",
6669
"rollup": "^2.26.11",
6770
"rollup-plugin-eslint": "^7.0.0",
68-
"rollup-plugin-terser": "^7.0.2",
69-
"rollup-plugin-uglify": "^6.0.4"
71+
"rollup-plugin-terser": "^7.0.2"
7072
},
7173
"dependencies": {
7274
"@babel/runtime": "^7.11.2",
7375
"signature_pad": "^2.3.2",
7476
"throttle-debounce": "^3.0.0"
7577
},
76-
"husky": {
77-
"hooks": {
78-
"pre-commit": "lint-staged"
79-
}
80-
},
8178
"lint-staged": {
8279
"*.js": "eslint --cache --fix"
8380
}

rollup.config.js

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,25 @@ import commonjs from '@rollup/plugin-commonjs';
33
import { eslint } from 'rollup-plugin-eslint';
44
import { nodeResolve } from '@rollup/plugin-node-resolve';
55
import { terser } from 'rollup-plugin-terser';
6-
import { uglify } from 'rollup-plugin-uglify';
76

87
import pkg from './package.json';
98

10-
const base = {
9+
export default {
1110
input: 'src/index.js',
11+
output: [
12+
{
13+
file: pkg.main,
14+
format: 'cjs',
15+
sourcemap: true,
16+
exports: 'default',
17+
},
18+
{
19+
file: pkg.module,
20+
format: 'es',
21+
sourcemap: true,
22+
exports: 'default',
23+
},
24+
],
1225
external: [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})],
1326
watch: {
1427
include: 'src/**',
@@ -23,32 +36,6 @@ const base = {
2336
}),
2437
commonjs(),
2538
nodeResolve(),
39+
terser(),
2640
],
2741
};
28-
29-
export default [
30-
{
31-
...base,
32-
...{
33-
output: {
34-
file: pkg.main,
35-
format: 'cjs',
36-
sourcemap: true,
37-
exports: 'default',
38-
},
39-
plugins: [...base.plugins, uglify()],
40-
},
41-
},
42-
{
43-
...base,
44-
...{
45-
output: {
46-
file: pkg.module,
47-
format: 'es',
48-
sourcemap: true,
49-
exports: 'default',
50-
},
51-
plugins: [...base.plugins, terser()],
52-
},
53-
},
54-
];

0 commit comments

Comments
 (0)