Skip to content

Commit 74824d5

Browse files
committed
1.0.1
1 parent 9e3239f commit 74824d5

File tree

4 files changed

+30
-20
lines changed

4 files changed

+30
-20
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"scripts": {
1111
"demo": "cd packages/demo && yarn start",
12-
"docs": "cd packages/react-nipple && yarn esdoc && cp -r ./docs ../..",
12+
"docs": "cd packages/react-nipple && yarn docs && cp -r ./docs ../..",
1313
"nuke": "find . -name node_modules -type d -exec rm -rf '{}' + && yarn"
1414
}
1515
}

packages/react-nipple/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 1.0.1
2+
3+
- Add `prepublishOnly` script
4+
- Update docs and readme
5+
6+
# 1.0.0
7+
8+
- Init

packages/react-nipple/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ A react wrapper for the [nipplejs](https://www.npmjs.com/package/nipplejs) on-sc
44

55
<img src="https://raw.githubusercontent.com/loopmode/react-nipple/master/packages/react-nipple/preview.gif" />
66

7+
### Resources
8+
9+
- Github repository: [https://github.com/loopmode/react-nipple](https://github.com/loopmode/react-nipple)
10+
- NPM package: [https://www.npmjs.com/package/react-nipple](https://www.npmjs.com/package/react-nipple)
11+
- Docs: [https://loopmode.github.io/react-nipple/](https://loopmode.github.io/react-nipple/)
12+
713
## Installation
814

915
```bash
@@ -12,12 +18,6 @@ yarn add react-nipple
1218
npm install --save react-nipple
1319
```
1420

15-
### Resources
16-
17-
- Github repository: [https://github.com/loopmode/react-nipple](https://github.com/loopmode/react-nipple)
18-
- NPM package: [https://www.npmjs.com/package/react-nipple](https://www.npmjs.com/package/react-nipple)
19-
- Docs: [https://loopmode.github.io/react-nipple/](https://loopmode.github.io/react-nipple/)
20-
2121
## Usage
2222

2323
Import and use the component. It supports all `options` from `nipplejs`.
@@ -40,7 +40,7 @@ class Example extends React.Component {
4040
options={{ mode: 'static', position: { top: '50%', left: '50%' } }}
4141
// any unknown props will be passed to the container element, e.g. 'title', 'style' etc
4242
style={{
43-
outline: `1px dashed red`,
43+
outline: '1px dashed red',
4444
width: 150,
4545
height: 150
4646
// if you pass position: 'relative', you don't need to import the stylesheet
@@ -84,22 +84,22 @@ import React from 'react';
8484
import ReactNipple from 'react-nipple';
8585
import DebugView from 'react-nipple/lib/DebugView';
8686

87-
class ReactNippleExample extends React.Component {
87+
export default class DebugExample extends React.Component {
8888
state = {
8989
data: {}
9090
};
9191
render() {
9292
return (
9393
<div>
9494
<ReactNipple
95-
options={{mode: 'static', position: {top: '50%', left: '50%'}}}
95+
options={{ mode: 'static', position: { top: '50%', left: '50%' } }}
9696
style={{
97-
outline: `1px dashed red`,
97+
outline: '1px dashed red',
98+
color. 'blue',
9899
width: 150,
99-
height: 150
100-
position: `relative`
100+
height: 150,
101+
position: 'relative'
101102
}}
102-
103103
onStart={this.handleEvent}
104104
onEnd={this.handleEvent}
105105
onMove={this.handleEvent}
@@ -116,6 +116,6 @@ class ReactNippleExample extends React.Component {
116116
handleEvent = (evt, data) => {
117117
console.log(evt);
118118
this.setState({ data });
119-
}
119+
};
120120
}
121121
```

packages/react-nipple/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"name": "react-nipple",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"main": "lib/index.js",
55
"license": "MIT",
66
"scripts": {
7-
"babel": "babel src --out-dir lib --copy-files",
8-
"eslint": "eslint src",
9-
"esdoc": "esdoc",
107
"clean": "rm -rf lib/*",
11-
"prepublishOnly": "yarn eslint && yarn clean && yarn babel"
8+
"eslint": "eslint src",
9+
"docs": "esdoc",
10+
"build": "babel src --out-dir lib --copy-files",
11+
"build:watch": "yarn build --watch",
12+
"build:full": "yarn clean && yarn eslint --fix && yarn docs && yarn build",
13+
"prepublishOnly": "yarn build:full"
1214
},
1315
"peerDependencies": {
1416
"react": "^16.4.1",

0 commit comments

Comments
 (0)