Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "react-diff", | ||
"version": "0.0.1", | ||
"description": "React diff component", | ||
"version": "0.0.2", | ||
"description": "Highlight differences between inputs", | ||
"main": "lib/react-diff.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -1,71 +0,32 @@ | ||
# react-component-boilerplate | ||
# react-diff | ||
Boilerplate for creating React components | ||
Highlights differences between two strings, uses the [diff](https://www.npmjs.com/package/diff) module | ||
## Installing | ||
## Installation | ||
```bash | ||
$ git clone https://github.com/mzabriskie/react-component-boilerplate.git | ||
$ npm install | ||
``` | ||
## Building | ||
Start webpack | ||
```bash | ||
$ npm start | ||
# or | ||
$ ./script/build | ||
npm install react-diff | ||
``` | ||
## Testing | ||
## Demo | ||
Start karma | ||
http://cezary.github.io/react-diff/example/ | ||
```bash | ||
$ npm test | ||
# or | ||
$ ./script/test --auto-watch | ||
``` | ||
## Example | ||
## Running | ||
```javascript | ||
var React = require('react'); | ||
var Diff = require('react-diff'); | ||
A simple example is setup to run out of the box | ||
```bash | ||
$ npm start | ||
$ open example/index.html | ||
var Component = React.createClass({ | ||
render: function() { | ||
return ( | ||
<Diff inputA="gogol" inputB="google" type="words" /> | ||
); | ||
} | ||
}); | ||
``` | ||
## License | ||
## Setup | ||
You'll need to change a few things | ||
```bash | ||
# Delete .git | ||
$ cd react-component-boilerplate | ||
$ rm -rf .git | ||
# Update package.json and bower.json | ||
# name, version, description, repository, keywords, author, license, bugs, homepage | ||
$ vim package.json | ||
$ vim bower.json | ||
# Update webpack.config.js | ||
$ vim webpack.config.js | ||
# Update build script | ||
$ vim script/build | ||
# Rename lib/example.js | ||
$ mv lib/example.js lib/whatever.js | ||
$ vim index.js | ||
$ vim example/index.html | ||
$ vim specs/example.spec.js | ||
# Rename specs/example.spec.js | ||
$ mv specs/example.spec.js specs/whatever.spec.js | ||
$ vim specs/main.js | ||
``` | ||
MIT |
150079
33