Skip to content

Commit

Permalink
Release 3.0.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
szimek committed Mar 15, 2018
1 parent 6e4e68b commit 5369c3a
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 15 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
## Changelog

### master
### 3.0.0-beta.1
#### Breaking changes
- Rewrite library using TypeScript. TypeScript declaration files are now provided by the library. Hopefully, it should be a bit easier to refactor now...
- Rename generated build files. The new files are:
```bash
dist/signature_pad.js # unminified CommonJS
dist/signature_pad.min.js # minified CommonJS
dist/signature_pad.umd.js # unminified UMD
dist/signature_pad.umd.min.js # minified UMD
dist/signature_pad.m.js # unminified ES module
dist/signature_pad.m.min.js # minified ES module
```

#### Bug Fixes
- Allow scrolling via touch after calling `SignaturePad#off`([felixhammerl](https://github.com/felixhammerl) and [patrickbussmann](https://github.com/patrickbussmann)).

#### Features
- Add very basic unit tests for Point and Bezier classes.

### 2.3.2
#### Bug Fixes
- Fix `fromData` to properly handle color changes. ([szimek](https://github.com/szimek) closes [#302](https://github.com/szimek/signature_pad/issues/302)).
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ You can select a different version at [https://www.jsdelivr.com/package/npm/sign

This library is provided as UMD (Universal Module Definition) and ES6 module.

**NOTE** When importing this library in TypeScript, one needs to use the following syntax:
```js
import * as SignaturePad from 'signature_pad';
```
For more info why it's needed, check these 2 issues: [TypeScript#13017](https://github.com/Microsoft/TypeScript/issues/13017) and [rollup#1156](https://github.com/rollup/rollup/issues/1156).

## Usage
### API
``` javascript
Expand Down
2 changes: 1 addition & 1 deletion docs/js/signature_pad.umd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Signature Pad v3.0.0 | https://github.com/szimek/signature_pad
* Signature Pad v3.0.0-beta.1 | https://github.com/szimek/signature_pad
* (c) 2018 Szymon Nowak | Released under the MIT license
*/

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "signature_pad",
"description": "Library for drawing smooth signatures.",
"version": "3.0.0",
"version": "3.0.0-beta.1",
"homepage": "https://github.com/szimek/signature_pad",
"author": {
"name": "Szymon Nowak",
Expand All @@ -10,13 +10,13 @@
},
"license": "MIT",
"source": "src/signature_pad.ts",
"dev:main": "dist/signature_pad.development.js",
"main": "dist/signature_pad.js",
"dev:main": "dist/signature_pad.js",
"main": "dist/signature_pad.min.js",
"module": "dist/signature_pad.m.js",
"umd:main": "dist/signature_pad.umd.js",
"types": "dist/types/signature_pad.d.ts",
"scripts": {
"build": "del dist && rollup --config && cp dist/signature_pad.umd.js docs/js/",
"build": "del dist && rollup --config && mv dist/src dist/types && cp dist/signature_pad.umd.js docs/js/",
"prepublishOnly": "yarn run build",
"test": "jest --coverage"
},
Expand Down
18 changes: 16 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,34 @@ export default [
banner,
},
},
// ES module unminified
{
input: 'src/signature_pad.ts',
plugins: plugins({
compilerOptions: {
target: 'ES6',
},
}),
output: {
file: 'dist/signature_pad.m.js',
format: 'es',
banner,
},
},
// ES module minified
{
input: 'src/signature_pad.ts',
plugins: [
...plugins({
compilerOptions: {
target: 'ES5',
target: 'ES6',
declaration: true,
},
}),
uglify()
],
output: {
file: 'dist/signature_pad.m.js',
file: 'dist/signature_pad.m.min.js',
format: 'es',
banner,
},
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@

"sourceMap": true,
"declaration": false,
"declarationDir": "dist/types"
"declarationDir": "dist"
}
}

0 comments on commit 5369c3a

Please sign in to comment.