Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
loopmode committed Jul 26, 2018
1 parent 9e3239f commit 74824d5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"scripts": {
"demo": "cd packages/demo && yarn start",
"docs": "cd packages/react-nipple && yarn esdoc && cp -r ./docs ../..",
"docs": "cd packages/react-nipple && yarn docs && cp -r ./docs ../..",
"nuke": "find . -name node_modules -type d -exec rm -rf '{}' + && yarn"
}
}
8 changes: 8 additions & 0 deletions packages/react-nipple/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 1.0.1

- Add `prepublishOnly` script
- Update docs and readme

# 1.0.0

- Init
28 changes: 14 additions & 14 deletions packages/react-nipple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ A react wrapper for the [nipplejs](https://www.npmjs.com/package/nipplejs) on-sc

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

### Resources

- Github repository: [https://github.com/loopmode/react-nipple](https://github.com/loopmode/react-nipple)
- NPM package: [https://www.npmjs.com/package/react-nipple](https://www.npmjs.com/package/react-nipple)
- Docs: [https://loopmode.github.io/react-nipple/](https://loopmode.github.io/react-nipple/)

## Installation

```bash
Expand All @@ -12,12 +18,6 @@ yarn add react-nipple
npm install --save react-nipple
```

### Resources

- Github repository: [https://github.com/loopmode/react-nipple](https://github.com/loopmode/react-nipple)
- NPM package: [https://www.npmjs.com/package/react-nipple](https://www.npmjs.com/package/react-nipple)
- Docs: [https://loopmode.github.io/react-nipple/](https://loopmode.github.io/react-nipple/)

## Usage

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

class ReactNippleExample extends React.Component {
export default class DebugExample extends React.Component {
state = {
data: {}
};
render() {
return (
<div>
<ReactNipple
options={{mode: 'static', position: {top: '50%', left: '50%'}}}
options={{ mode: 'static', position: { top: '50%', left: '50%' } }}
style={{
outline: `1px dashed red`,
outline: '1px dashed red',
color. 'blue',
width: 150,
height: 150
position: `relative`
height: 150,
position: 'relative'
}}

onStart={this.handleEvent}
onEnd={this.handleEvent}
onMove={this.handleEvent}
Expand All @@ -116,6 +116,6 @@ class ReactNippleExample extends React.Component {
handleEvent = (evt, data) => {
console.log(evt);
this.setState({ data });
}
};
}
```
12 changes: 7 additions & 5 deletions packages/react-nipple/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"name": "react-nipple",
"version": "1.0.0",
"version": "1.0.1",
"main": "lib/index.js",
"license": "MIT",
"scripts": {
"babel": "babel src --out-dir lib --copy-files",
"eslint": "eslint src",
"esdoc": "esdoc",
"clean": "rm -rf lib/*",
"prepublishOnly": "yarn eslint && yarn clean && yarn babel"
"eslint": "eslint src",
"docs": "esdoc",
"build": "babel src --out-dir lib --copy-files",
"build:watch": "yarn build --watch",
"build:full": "yarn clean && yarn eslint --fix && yarn docs && yarn build",
"prepublishOnly": "yarn build:full"
},
"peerDependencies": {
"react": "^16.4.1",
Expand Down

0 comments on commit 74824d5

Please sign in to comment.