Skip to content

Commit 9bdaa1b

Browse files
committed
bower replaced with npm
1 parent b670134 commit 9bdaa1b

File tree

11 files changed

+182
-69
lines changed

11 files changed

+182
-69
lines changed

.bowerrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
node_modules/

.eslintrc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"parser": "babel-eslint",
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
7+
"plugins": [
8+
"react"
9+
],
10+
"ecmaFeatures": {
11+
"jsx": true,
12+
"modules": true
13+
},
14+
"rules": {
15+
"new-cap": 0,
16+
"strict": [
17+
2,
18+
"global"
19+
],
20+
"no-underscore-dangle": 0,
21+
"no-use-before-define": 0,
22+
"eol-last": 1,
23+
"quotes": [
24+
2,
25+
"single"
26+
],
27+
"comma-dangle": 0,
28+
"react/jsx-boolean-value": 1,
29+
"react/jsx-quotes": 1,
30+
"react/jsx-no-undef": 1,
31+
"react/jsx-uses-react": 1,
32+
"react/jsx-uses-vars": 1,
33+
"react/no-did-mount-set-state": 1,
34+
"react/no-did-update-set-state": 1,
35+
"react/no-multi-comp": 0,
36+
"react/no-unknown-property": 1,
37+
"react/react-in-jsx-scope": 1,
38+
"react/self-closing-comp": 1
39+
}
40+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/.idea/
22
vendor
3+
node_modules

README.md

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,71 @@
1-
# react-babel
1+
# react-requirejs-boilerplate
22

3-
Using [React](http://facebook.github.io/react/) with JSX, ES6 modules and all other ES6 and experimental ES7
4-
features provided by [Babel](https://babeljs.io/) transpiler. ES6 files are transpiled on fly (and cached) by the browser
5-
alone (no Grunt/Gulp/Broccoli processing is needed).
3+
Example of using [requirejs-babel](https://github.com/hipertracker/requirejs-babel)
64

75
## Install
86

97
```
10-
bower install
8+
git clone https://github.com/hipertracker/react-requirejs-boilerplate.git
9+
cd react-requirejs-boilerplate
10+
npm install
1111
```
1212

1313
## Launch
1414

1515
```
16-
http-server -p 3000
16+
npm start
1717
open http://localhost:3000
1818
```
1919

20+
## Resources
21+
22+
### Babel ES6+ & React
23+
24+
* React on ES6+ [http://babeljs.io/blog/2015/06/07/react-on-es6-plus/](http://babeljs.io/blog/2015/06/07/react-on-es6-plus/)
25+
* Learn ES2015. A detailed overview of ECMAScript 6 features http://babeljs.io/docs/learn-es2015/
26+
27+
### Dev tools
28+
29+
* Flow - a static type checked for JavaScript [http://flowtype.org/](http://flowtype.org/)
30+
31+
* [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi) (Chrome extension)
32+
33+
### Data workflow
34+
35+
#### Flux
36+
37+
* Flux For Stupid People [http://blog.andrewray.me/flux-for-stupid-people/](http://blog.andrewray.me/flux-for-stupid-people/)
38+
39+
* Flux: No More Stores, Meet Reducer [https://blog.javascripting.com/2015/06/19/flux-no-more-stores-meet-reducer/]([https://blog.javascripting.com/2015/06/19/flux-no-more-stores-meet-reducer/]) + [discussion on Reddit](https://www.reddit.com/r/javascript/comments/3ap0y6/flux_no_more_stores_meet_reducer/)
40+
41+
* Dan Abramov - Live React: Hot Reloading with Time Travel [https://www.youtube.com/watch?v=xsSnOQynTHs](https://www.youtube.com/watch?v=xsSnOQynTHs) (react-europe 2015)
42+
43+
The best Flux libs:
44+
45+
* **Nuclear-JS** [http://optimizely.github.io/nuclear-js/](http://optimizely.github.io/nuclear-js/)
46+
47+
* **Redux** [https://github.com/gaearon/redux](https://github.com/gaearon/redux), successor of [Flummox](http://acdlite.github.io/flummox)
48+
49+
* Alt [http://alt.js.org/](http://alt.js.org/) + [Chrome extension](https://github.com/goatslacker/alt-devtool)
50+
51+
* Marty [http://martyjs.org/](http://martyjs.org/) + [Chrome extension](https://chrome.google.com/…/fifcikknnbggajppebgolpkaambnkpae)
52+
53+
#### Immutability, GraphQL and Relay
54+
55+
* Immutable Data and React [https://www.youtube.com/watch?v=I7IdS-PbEgI](https://www.youtube.com/watch?v=I7IdS-PbEgI) (React.js Conf 2015)
56+
57+
* Lee Byron - Exploring GraphQL at react-europe 2015 https://www.youtube.com/watch?v=WQLzZf34FJ8(author of Redux)
58+
59+
* Joseph Savona - Relay: An Application Framework For React at react-europe 2015https://www.youtube.com/watch?v=IrgHurBjQbg
60+
61+
### Mobile
62+
63+
* **React Native** [https://facebook.github.io/react-native/](https://facebook.github.io/react-native/)
64+
65+
### Other
66+
67+
* It's much easier to recover from "No abstraction" then a "Wrong abstraction" - Sebastian Markbage: Minimal API Surface Area [http://2014.jsconf.eu/speakers/sebastian-markbage-minimal-api-surface-area-learning-patterns-instead-of-frameworks.html](http://2014.jsconf.eu/speakers/sebastian-markbage-minimal-api-surface-area-learning-patterns-instead-of-frameworks.html) (JSConf EU 2014)
68+
69+
* React Europe 2015 [at Youtube](https://www.youtube.com/channel/UCorlLn2oZfgOJ-FUcF2eZ1A)
70+
71+
* React.js Conf 2015 [at Youtube](https://www.youtube.com/watch?v=KVZ-P-ZI6W4&list=PLb0IAmt7-GS1cbw4qonlQztYV1TAW0sCr)
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import React from 'react'
1+
import React from 'react';
22

3-
const Hello = React.createClass({
3+
export default class Hello extends React.Component {
44
render() {
55
return (
66
<section>
77
Hello World!
88
</section>
9-
)
9+
);
1010
}
11-
});
11+
}
1212

13-
export default Hello;

app/startup.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import React from 'react'
1+
import React from 'react';
22

3-
// works with babel-polyfill.js
3+
// generators work with babel-polyfill.js
44
function* foo() {
55
yield 1;
66
}
77

88
// Babel experimental:
9-
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
10-
console.log('@Babel experimental:')
11-
console.log('@x:',x);
12-
console.log('@y:',y);
13-
console.log('@z:',z);
9+
let { x, y, ...z } = {x: 1, y: 2, a: 3, b: 4};
10+
console.log('@Babel experimental:');
11+
console.log('@x:', x);
12+
console.log('@y:', y);
13+
console.log('@z:', z);
1414

15-
import Hello from 'es6!./components/Hello'
16-
React.render(React.createElement(Hello), document.getElementById('HelloWorld'));
15+
console.log(foo(1).next());
16+
17+
import HelloWorld from 'es6!./components/HelloWorld';
18+
React.render(React.createElement(HelloWorld), document.getElementById('HelloWorld'));

bower.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>react-babel</title>
7+
<title>react-requirejs-boilerplate</title>
88
</head>
99
<body>
10+
1011
<div id="HelloWorld">Loading...</div>
12+
13+
<script src="require-config.js"></script>
14+
<script src="node_modules/requirejs/require.js" data-main="es6!app/startup"></script>
1115
</body>
12-
<script src="require-config.js"></script>
13-
<script src="vendor/requirejs/require.js"></script>
14-
<script>
15-
require(['es6!app/startup']);
16-
</script>
16+
1717
</html>

package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "react-requirejs-boilerplate",
3+
"version": "0.1.0",
4+
"description": "Using [React](http://facebook.github.io/react/) with JSX, ES6 modules and all other ES6 and experimental ES7 features provided by [Babel](https://babeljs.io/) transpiler. ES6 files are transpiled on fly (and cached) by the browser alone (no Grunt/Gulp/Broccoli processing is needed).",
5+
"main": "require-config.js",
6+
"scripts": {
7+
"start": "http-server -p 3000",
8+
"test": "echo \"Error: no test specified\" && exit 1"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "git+https://github.com/hipertracker/react-requirejs-boilerplate.git"
13+
},
14+
"author": "",
15+
"license": "ISC",
16+
"bugs": {
17+
"url": "https://github.com/hipertracker/react-requirejs-boilerplate/issues"
18+
},
19+
"homepage": "https://github.com/hipertracker/react-requirejs-boilerplate#readme",
20+
"dependencies": {
21+
"core-decorators": "^0.1.2",
22+
"flowcheck": "^0.2.7",
23+
"immutable": "^3.7.4",
24+
"nuclear-js": "^1.0.5",
25+
"ramda": "^0.15.1",
26+
"react": "^0.13.3",
27+
"react-dnd": "^1.1.3",
28+
"requirejs": "^2.1.18",
29+
"requirejs-babel": "hipertracker/requirejs-babel",
30+
"text": "^0.1.0"
31+
},
32+
"devDependencies": {
33+
"babel-eslint": "^3.1.23",
34+
"eslint": "^0.24.1",
35+
"eslint-plugin-react": "^2.7.0",
36+
"http-server": "^0.8.0"
37+
}
38+
}

0 commit comments

Comments
 (0)