mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 23:27:54 -05:00
Merge pull request #60 from mewtaylor/feature/upgrade-react-0.14
Feature: Upgrade React to 0.14
This commit is contained in:
commit
0884294516
9 changed files with 7556 additions and 8433 deletions
11
package.json
11
package.json
|
@ -37,15 +37,18 @@
|
|||
"custom-event-polyfill": "0.2.1",
|
||||
"eslint": "1.3.1",
|
||||
"eslint-plugin-react": "3.3.1",
|
||||
"exenv": "1.2.0",
|
||||
"file-loader": "0.8.4",
|
||||
"json-loader": "0.5.2",
|
||||
"jsx-loader": "0.13.2",
|
||||
"minilog": "2.0.8",
|
||||
"node-sass": "3.3.3",
|
||||
"react": "0.13.3",
|
||||
"react-modal": "0.3.0",
|
||||
"react": "0.14.0",
|
||||
"react-addons-test-utils": "0.14.0",
|
||||
"react-dom": "0.14.0",
|
||||
"react-modal": "git://github.com/mewtaylor/react-modal.git#react-14",
|
||||
"react-onclickoutside": "0.3.1",
|
||||
"react-slick": "0.7.0",
|
||||
"react-slick": "git://github.com/mewtaylor/react-slick.git#remove-deprecation-warnings",
|
||||
"routes-to-nginx-conf": "0.0.4",
|
||||
"sass-lint": "1.2.0",
|
||||
"sass-loader": "2.0.1",
|
||||
|
@ -55,7 +58,7 @@
|
|||
"tape": "4.2.0",
|
||||
"url-loader": "0.5.6",
|
||||
"watch": "0.16.0",
|
||||
"webpack": "1.12.0",
|
||||
"webpack": "1.12.2",
|
||||
"xhr": "2.0.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
|
||||
<!-- Scripts -->
|
||||
<script src="/js/lib/react.js"></script>
|
||||
<script src="/js/lib/react-dom.js"></script>
|
||||
|
||||
<script src="/js/main.bundle.js"></script>
|
||||
<script src="/js/{{view}}.bundle.js"></script>
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ var Login = React.createClass({
|
|||
handleSubmit: function (event) {
|
||||
event.preventDefault();
|
||||
this.props.onLogIn({
|
||||
'username': this.refs.username.getDOMNode().value,
|
||||
'password': this.refs.password.getDOMNode().value
|
||||
'username': this.refs.username.value,
|
||||
'password': this.refs.password.value
|
||||
});
|
||||
},
|
||||
render: function () {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
var React = require('react');
|
||||
var ReactDOM = require('react-dom');
|
||||
|
||||
var Renderer = {
|
||||
render: function (jsx, toElement) {
|
||||
var rendered = React.render(jsx, toElement);
|
||||
var rendered = ReactDOM.render(jsx, toElement);
|
||||
if (process.env.NODE_ENV != 'production') {
|
||||
window.renderedComponents = window.renderedComponents || [];
|
||||
window.renderedComponents.push(rendered);
|
||||
|
|
42
static/js/lib/react-dom.js
vendored
Normal file
42
static/js/lib/react-dom.js
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* ReactDOM v0.14.0
|
||||
*
|
||||
* Copyright 2013-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
// Based off https://github.com/ForbesLindesay/umd/blob/master/template.js
|
||||
;(function(f) {
|
||||
// CommonJS
|
||||
if (typeof exports === "object" && typeof module !== "undefined") {
|
||||
module.exports = f(require('react'));
|
||||
|
||||
// RequireJS
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
define(['react'], f);
|
||||
|
||||
// <script>
|
||||
} else {
|
||||
var g
|
||||
if (typeof window !== "undefined") {
|
||||
g = window;
|
||||
} else if (typeof global !== "undefined") {
|
||||
g = global;
|
||||
} else if (typeof self !== "undefined") {
|
||||
g = self;
|
||||
} else {
|
||||
// works providing we're not in "use strict";
|
||||
// needed for Java 8 Nashorn
|
||||
// see https://github.com/facebook/react/issues/3037
|
||||
g = this;
|
||||
}
|
||||
g.ReactDOM = f(g.React);
|
||||
}
|
||||
|
||||
})(function(React) {
|
||||
return React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
});
|
12
static/js/lib/react-dom.min.js
vendored
Normal file
12
static/js/lib/react-dom.min.js
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* ReactDOM v0.14.0
|
||||
*
|
||||
* Copyright 2013-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOM=e(f.React)}}(function(e){return e.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED});
|
15897
static/js/lib/react.js
vendored
15897
static/js/lib/react.js
vendored
File diff suppressed because it is too large
Load diff
14
static/js/lib/react.min.js
vendored
14
static/js/lib/react.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -21,7 +21,8 @@ module.exports = {
|
|||
devtool: 'source-map',
|
||||
externals: {
|
||||
'react': 'React',
|
||||
'react/addons': 'React'
|
||||
'react/addons': 'React',
|
||||
'react-dom': 'ReactDOM'
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'build/js'),
|
||||
|
|
Loading…
Reference in a new issue