diff --git a/.travis.yml b/.travis.yml index 6e5919de39..7ff96ccb61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,14 @@ +--- language: node_js node_js: - - "0.10" +- '0.10' +after_script: +- curl -F "react=@build/react.js" -F "react.min=@build/react.min.js" -F "transformer=@build/JSXTransformer.js" + -F "commit=$TRAVIS_COMMIT" -F "date=`git log --format='%ct' -1`" -F "pull_request=$TRAVIS_PULL_REQUEST" + -F "token=$SECRET_TOKEN" $SERVER +env: + global: + # SERVER + - secure: qPvsJ46XzGrdIuPA70b55xQNGF8jcK7N1LN5CCQYYocXLa+fBrl+fTE77QvehOPhqwJXcj6kOxI+sY0KrVwV7gmq2XY2HZGWUSCxTN0SZlNIzqPA80Y7G/yOjA4PUt8LKgP+8tptyhTAY56qf+hgW8BoLiKOdztYF2p+3zXOLuA= + # SECRET_TOKEN + - secure: dkpPW+VnoqC/okhRdV90m36NcyBFhcwEKL3bNFExAwi0dXnFao8RoFlvnwiPlA23h2faROkMIetXlti6Aju08BgUFV+f9aL6vLyU7gUent4Nd3413zf2fwDtXIWIETg6uLnOpSykGKgCAT/hY3Q2oPLqOoY0OxfgnbqwxkxljrE= diff --git a/bin/jsx b/bin/jsx index 5e269cda97..aa6ae90ab8 100755 --- a/bin/jsx +++ b/bin/jsx @@ -41,6 +41,7 @@ require("commoner").resolve(function(id) { return context.getProvidedP().then(function(idToPath) { if (id !== "mock-modules" && id !== "mocks" && + id !== "test/all" && idToPath.hasOwnProperty("mock-modules")) { return source + '\nrequire("mock-modules").register(' + JSON.stringify(id) + ', module);\n'; diff --git a/docs/docs/07-working-with-the-browser.md b/docs/docs/07-working-with-the-browser.md index 7e4b1a979f..538b32f37d 100644 --- a/docs/docs/07-working-with-the-browser.md +++ b/docs/docs/07-working-with-the-browser.md @@ -110,7 +110,7 @@ _Mounted_ composite components also support the following methods: > calling `this.getDOMNode()`. -## Browser Suppport and Polyfills +## Browser Support and Polyfills At Facebook, we support older browsers, including IE8. We've had polyfills in place for a long time to allow us to write forward-thinking JS. This means we don't have a bunch of hacks scattered throughout our codebase and we can still expect our code to "just work". For example, instead of seeing `+new Date()`, we can just write `Date.now()`. Since the open source React is the same as what we use internally, we've carried over this philosophy of using forward thinking JS. diff --git a/examples/ballmer-peak/example.js b/examples/ballmer-peak/example.js index 15a673cf2e..8400ae5a14 100644 --- a/examples/ballmer-peak/example.js +++ b/examples/ballmer-peak/example.js @@ -14,8 +14,8 @@ var BallmerPeakCalculator = React.createClass({ getInitialState: function() { return {bac: 0}; }, - handleChange: function() { - this.setState({bac: this.refs.bac.getDOMNode().value}); + handleChange: function(event) { + this.setState({bac: event.target.value}); }, render: function() { var bac; @@ -33,7 +33,7 @@ var BallmerPeakCalculator = React.createClass({
If your BAC is{' '} - + {', '}then {pct} of your lines of code will have bugs.
diff --git a/examples/jquery-bootstrap/js/app.js b/examples/jquery-bootstrap/js/app.js index 754eed05fc..b522605705 100644 --- a/examples/jquery-bootstrap/js/app.js +++ b/examples/jquery-bootstrap/js/app.js @@ -7,7 +7,7 @@ var BootstrapButton = React.createClass({ // transferPropsTo() is smart enough to merge classes provided // to this component. return this.transferPropsTo( - + {this.props.children} ); @@ -19,12 +19,18 @@ var BootstrapModal = React.createClass({ // integrate with Bootstrap or jQuery! componentDidMount: function() { // When the component is added, turn it into a modal - $(this.getDOMNode()).modal({backdrop: 'static', keyboard: false}); + $(this.getDOMNode()) + .modal({backdrop: 'static', keyboard: false, show: false}) }, componentWillUnmount: function() { - // And when it's destroyed, hide it. + $(this.getDOMNode()).off('hidden', this.handleHidden); + }, + close: function() { $(this.getDOMNode()).modal('hide'); }, + open: function() { + $(this.getDOMNode()).modal('show'); + }, render: function() { var confirmButton = null; var cancelButton = null; @@ -32,92 +38,84 @@ var BootstrapModal = React.createClass({ if (this.props.confirm) { confirmButton = (