Skip to content

Commit 544cedb

Browse files
committed
Replace webpack in favor of rollup for bundling
1 parent 041e346 commit 544cedb

20 files changed

+7121
-3652
lines changed

.babelrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"presets": ["es2015", "stage-0", "react"]
2+
"presets": [
3+
["es2015", {"modules": false}],
4+
"stage-0",
5+
"react"
6+
]
37
}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
/node_modules
21
.DS_Store
2+
node_modules
3+
dist
4+
example/dist
5+
example/node_modules

.npmignore

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

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# react-signature-pad-wrapper
2-
A React wrapper for [signature pad](https://github.com/szimek/signature_pad).
2+
A React wrapper for [signature pad](https://github.com/szimek/signature_pad).
33

44
There are some other React packages that are based off the original *signature_pad* plugin (e.g. [react-signature-pad](https://github.com/blackjk3/react-signature-pad), [react-signature-canvas](https://github.com/agilgur5/react-signature-canvas)). This package is different in the sense that it relies on *signature_pad* as a dependency rather than an implementation that is based off of it (like the aforementioned packages).
55

@@ -8,9 +8,13 @@ This package is available through npm:
88
```
99
npm install --save react-signature-pad-wrapper
1010
```
11+
In addition to *React* you will need to install the [prop-types](https://github.com/facebook/prop-types) package:
12+
```
13+
npm install --save prop-types
14+
```
1115

1216
## Usage
13-
This package implements exactly the same interface as the original *signature_pad* and adds a couple of extra features that make responsive behaviour a little easier to deal with. For a complete overview of the available options and callables see the documentation for [signature pad](https://github.com/szimek/signature_pad).
17+
This package implements exactly the same interface as the original *signature_pad* package and adds a couple of extra features that make responsive behaviour a little easier to deal with. For a complete overview of the available options and callables see the documentation for [signature pad](https://github.com/szimek/signature_pad).
1418

1519
Import the component like (ES6):
1620
```javascript
@@ -64,7 +68,7 @@ render() {
6468
}
6569
...
6670
```
67-
The canvas width and height will now be updated whenever the window is resized (using a debounced handler). Changing the width and height properties of a HTML canvas object will erase its current content.
71+
The canvas width and height will now be updated whenever the window is resized (using a debounced handler). Changing the width and height properties of a HTML canvas object will erase its current content.
6872

6973
If you'd like to keep what is currently drawn on the canvas you can pass a `redrawOnResize` property to the component and set it to `true` (`redrawOnResize` is `false` by default):
7074
```javascript
@@ -81,4 +85,4 @@ This project includes a simple example that demonstrates a responsive sketch pad
8185
```
8286
npm run build:example
8387
```
84-
Then open `example/index.html` in a browser of yout choice.
88+
Then open `example/index.html` in a browser of your choice.

dist/react-signature-pad-wrapper.js

Lines changed: 998 additions & 180 deletions
Large diffs are not rendered by default.

dist/react-signature-pad-wrapper.min.js

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

example/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015", "stage-0", "react"]
3+
}

example/build/bundle.js

Lines changed: 0 additions & 147 deletions
This file was deleted.

example/build/manifest.js

Lines changed: 0 additions & 150 deletions
This file was deleted.

0 commit comments

Comments
 (0)