Skip to content

Commit 91b507a

Browse files
committed
update dependencies and tools
1 parent 214cb62 commit 91b507a

19 files changed

+489
-166
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"stage": 0
2+
"presets": ["es2015", "react"],
3+
"plugins": ["transform-runtime"]
34
}

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
dist
21
node_modules
2+
dev
3+
dist

.eslintrc

Lines changed: 305 additions & 11 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
node_modules
2-
npm-debug.log
31
.DS_Store
42
.dropbox
53
.dropbox.cache
4+
5+
node_modules
6+
npm-debug.log
7+
8+
dev
69
dist

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22

33
A boilerplate for React using Tape for testing.
44

5-
### Disclaimer
6-
7-
Not updated in quite a while. I would recommend you to look at other react boilerplates instead of this one.
8-
95
### Getting Started
106

11-
1. clone this repo
12-
2. cd into folder
7+
1. `git clone https://github.com/fc-io/react-tape.git`
8+
2. `cd react-tape`
139
3. `npm install`
1410
4. `npm start`
1511
5. open http://localhost:3000
1612

13+
### Build for Production
14+
15+
```
16+
npm run deploy
17+
```
18+
1719
### Testing
1820

1921
```
@@ -26,11 +28,9 @@ npm test
2628
npm run lint
2729
```
2830

29-
### Build for Production
31+
## Caveats
3032

31-
```
32-
npm run deploy
33-
```
33+
Hot Reloading of stateless functional components does not work.
3434

3535
## License
3636

app/components/hello.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react'
2+
3+
export default class Hello extends React.Component {
4+
constructor (props) {
5+
super(props)
6+
this.toggle = this.toggle.bind(this)
7+
this.state = {toggle: false}
8+
}
9+
toggle () {
10+
this.setState({toggle: !this.state.toggle})
11+
}
12+
render () {
13+
return (
14+
<div>
15+
<h1 className="cblue">Hello World!!</h1>
16+
<p>{`Toggled: ${this.state.toggle}`}</p>
17+
<button onClick={this.toggle}>Toggle</button>
18+
</div>
19+
)
20+
}
21+
}
File renamed without changes.
File renamed without changes.

app/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import './css/style.css'
2+
3+
import React from 'react'
4+
import ReactDOM from 'react-dom'
5+
import Hello from './components/hello'
6+
7+
ReactDOM.render(<Hello />, document.getElementById('root'))

package.json

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-tape",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
44
"description": "A boilerplate for React using Tape for testing.",
55
"author": "Fredrik Carlsson <[email protected]>",
66
"license": "MIT",
@@ -9,27 +9,37 @@
99
"url": "https://github.com/fc-io/react-tape"
1010
},
1111
"scripts": {
12-
"start": "node webpack.dev.server.hot.js",
13-
"test": "babel-tape-runner ./test/**/*",
12+
"start": "webpack-dev-server",
13+
"deploy": "NODE_ENV=production webpack -p --config webpack.prod.config.js",
14+
"test": "babel-tape-runner ./test/**/*.test.js",
1415
"lint": "eslint .",
15-
"deploy": "NODE_ENV=production webpack -p --config webpack.production.config.js"
16+
"lint:fix": "eslint . --fix"
1617
},
1718
"devDependencies": {
18-
"babel": "^5.8.23",
19-
"babel-core": "^5.8.23",
20-
"babel-loader": "^5.3.2",
21-
"babel-tape-runner": "^1.2.0",
22-
"blue-tape": "^0.1.10",
23-
"css-loader": "^0.16.0",
24-
"eslint": "^1.3.1",
25-
"eslint-plugin-react": "^3.3.0",
26-
"html-webpack-plugin": "^1.6.1",
19+
"babel-core": "^6.7.4",
20+
"babel-eslint": "^v6.0.0-beta.6",
21+
"babel-loader": "^6.2.4",
22+
"babel-plugin-transform-runtime": "^6.6.0",
23+
"babel-preset-es2015": "^6.6.0",
24+
"babel-preset-react": "^6.5.0",
25+
"babel-tape-runner": "^2.0.1",
26+
"blue-tape": "^0.2.0",
27+
"css-loader": "^0.23.1",
28+
"enzyme": "^2.2.0",
29+
"eslint": "^2.4.0",
30+
"eslint-plugin-babel": "^3.1.0",
31+
"eslint-plugin-react": "^4.2.3",
32+
"html-webpack-plugin": "^2.14.0",
33+
"react-addons-test-utils": "^0.14.7",
2734
"react-hot-loader": "^1.3.0",
28-
"style-loader": "^0.12.3",
35+
"style-loader": "^0.13.1",
2936
"webpack": "^1.12.0",
3037
"webpack-dev-server": "^1.10.1"
3138
},
3239
"dependencies": {
33-
"react": "^0.13.3"
40+
"babel-polyfill": "^6.6.1",
41+
"babel-runtime": "^6.6.1",
42+
"react": "^15.0.0-rc.2",
43+
"react-dom": "^15.0.0-rc.2"
3444
}
3545
}

0 commit comments

Comments
 (0)