Skip to content

Commit 1361057

Browse files
committed
updated libraries, removed redundant code
1 parent a9d231f commit 1361057

File tree

5 files changed

+12
-45
lines changed

5 files changed

+12
-45
lines changed

app/components/HelloWorld.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React, { PropTypes } from 'react';
1+
import React, { Component, PropTypes } from 'react';
22

3-
export default class HelloWorld extends React.Component {
3+
export default class HelloWorld extends Component {
44
static propTypes = {
55
name: PropTypes.string.isRequired
66
};

app/startup.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
import React from 'react';
22

3-
// see more http://babeljs.io/docs/learn-es2015/
4-
5-
var fibonacci = {
6-
[Symbol.iterator]: function*() {
7-
var pre = 0, cur = 1;
8-
for (;;) {
9-
var temp = pre;
10-
pre = cur;
11-
cur += temp;
12-
yield cur;
13-
}
14-
}
15-
};
16-
17-
for (var n of fibonacci) {
18-
// truncate the sequence at 1000
19-
if (n > 1000) {
20-
break;
21-
}
22-
console.log(n);
23-
}
24-
25-
26-
import HelloWorld from 'es6!./components/HelloWorld';
3+
import HelloWorld from 'es6!app/components/HelloWorld';
274

285
React.render(<HelloWorld name="Jarek"/>, document.getElementById('HelloWorld'));

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<title>react-requirejs-boilerplate</title>
88
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
9-
<link href="app.css" rel="stylesheet">
109
</head>
1110
<body>
1211

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-requirejs-boilerplate",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"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).",
55
"main": "require-config.js",
66
"scripts": {
@@ -18,15 +18,13 @@
1818
},
1919
"homepage": "https://github.com/hipertracker/react-requirejs-boilerplate#readme",
2020
"dependencies": {
21-
"core-decorators": "^0.1.2",
21+
"classnames": "^2.1.3",
22+
"core-decorators": "^0.1.5",
2223
"flowcheck": "^0.2.7",
2324
"immutable": "^3.7.4",
2425
"react": "^0.13.3",
25-
"classnames": "^2.1.3",
26-
"requirejs": "^2.1.19",
27-
"requirejs-babel": "hipertracker/requirejs-babel",
28-
"text": "^0.1.0",
29-
"marty": "^0.10.4"
26+
"requirejs": "^2.1.20",
27+
"requirejs-babel": "hipertracker/requirejs-babel"
3028
},
3129
"devDependencies": {
3230
"babel-eslint": "^3.1.23",

require-config.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ var require = {
99
babel: vendorPath + '/requirejs-babel/browser',
1010
polyfill: vendorPath + '/requirejs-babel/polyfill',
1111
es6: vendorPath + '/requirejs-babel/es6',
12-
text: vendorPath + '/text/lib/index',
1312

14-
react: vendorPath + '/react/dist/react-with-addons'
15-
classnames: vendorPath + 'classnames/index',
16-
immutable: vendorPath + '/immutable/dist/immutable',
17-
18-
marty: vendorPath + 'marty/dist/marty',
19-
'react-bootstrap': vendorPath + 'react_bootstrap/dist/react-bootstrap'
13+
react: vendorPath + '/react/dist/react-with-addons',
14+
classnames: vendorPath + 'classnames/index'
15+
2016
},
2117
shim: {
2218
babel: {
@@ -25,11 +21,8 @@ var require = {
2521
}
2622
};
2723

28-
if (window.env === 'prod') {
24+
if (window.ENV === 'prod') {
2925
require.paths.babel = vendorPath + '/requirejs-babel/browser.min';
3026
require.paths.polyfill = vendorPath + '/requirejs-babel/polyfill.min';
3127
require.paths.react = vendorPath + '/react/dist/react-with-addons.min';
32-
require.paths.immutable = vendorPath + '/immutable/dist/immutable.min';
33-
require.paths.marty = vendorPath + 'marty/dist/marty.min';
34-
require.paths['react-bootstrap'] = vendorPath + 'react_bootstrap/dist/react-bootstrap.min';
3528
}

0 commit comments

Comments
 (0)