diff --git a/examples/dynamic/package.json b/examples/dynamic/package.json index b1ea11a..07184ec 100644 --- a/examples/dynamic/package.json +++ b/examples/dynamic/package.json @@ -5,14 +5,16 @@ "author": "Chris Johnson ", "private": true, "scripts": { - "start": "browserify -t babelify --standalone main views/main.js -o public/main.js && node app.js" + "start": "browserify -t [ babelify --presets [ es2015 react ] --standalone main views/main.js -o public/main.js ] && node app.js" }, "dependencies": { - "babelify": "^6.3.0", - "browserify": "^8.0.3", - "express": "^4.10.6", + "babel-preset-es2015": "^6.24.1", + "babel-preset-react": "^6.24.1", + "babelify": "^7.3.0", + "browserify": "^14.3.0", + "express": "^4.15.3", "express-react-views": "file:../../", - "react": "^15.0.0", - "react-dom": "^15.0.0" + "react": "^15.5.4", + "react-dom": "^15.5.4" } } diff --git a/examples/simple/package.json b/examples/simple/package.json index fad2449..b04ba55 100644 --- a/examples/simple/package.json +++ b/examples/simple/package.json @@ -6,11 +6,12 @@ "start": "node app.js" }, "dependencies": { - "errorhandler": "^1.4.3", - "express": "^4.13.4", + "errorhandler": "^1.5.0", + "express": "^4.15.3", "express-react-views": "file:../../", - "morgan": "^1.7.0", - "react": "^15.0.0", - "react-dom": "^15.0.0" + "morgan": "^1.8.1", + "prop-types": "^15.5.10", + "react": "^15.5.4", + "react-dom": "^15.5.4" } } diff --git a/examples/simple/views/index.jsx b/examples/simple/views/index.jsx index 90603f9..a7e8a07 100644 --- a/examples/simple/views/index.jsx +++ b/examples/simple/views/index.jsx @@ -1,4 +1,5 @@ var React = require('react'); +var PropTypes = require('prop-types'); var Layout = require('./layout'); // Contrived example to show how one might use Flow type annotations @@ -26,7 +27,7 @@ class Index extends React.Component { } Index.propTypes = { - title: React.PropTypes.string + title: PropTypes.string }; module.exports = Index; diff --git a/examples/simple/views/layout.jsx b/examples/simple/views/layout.jsx index 2c6e7ee..95d51d7 100644 --- a/examples/simple/views/layout.jsx +++ b/examples/simple/views/layout.jsx @@ -1,4 +1,5 @@ var React = require('react'); +var PropTypes = require('prop-types'); class Layout extends React.Component { render() { @@ -23,7 +24,7 @@ class Layout extends React.Component { } Layout.propTypes = { - title: React.PropTypes.string + title: PropTypes.string }; module.exports = Layout; diff --git a/package.json b/package.json index 8ca58c9..b02c173 100644 --- a/package.json +++ b/package.json @@ -22,16 +22,18 @@ "react-dom": "^0.14.0 || ^15.0.0" }, "dependencies": { - "babel-preset-es2015": "^6.5.0", - "babel-preset-react": "^6.5.0", - "babel-register": "^6.5.1", - "js-beautify": "^1.5.10", - "lodash.escaperegexp": "^4.1.1", - "object-assign": "^4.0.1" + "babel-preset-es2015": "^6.24.1", + "babel-preset-react": "^6.24.1", + "babel-register": "^6.24.1", + "js-beautify": "^1.6.14", + "lodash.escaperegexp": "^4.1.2", + "object-assign": "^4.1.1" }, "devDependencies": { - "react": "^15.0.0", - "react-dom": "^15.0.0", - "async": "^1.4.2" + "async": "^2.4.0", + "create-react-class": "^15.5.3", + "prop-types": "^15.5.10", + "react": "^15.5.4", + "react-dom": "^15.5.4" } } diff --git a/test/es5-component.jsx b/test/es5-component.jsx index e0eabee..4bfaaa1 100644 --- a/test/es5-component.jsx +++ b/test/es5-component.jsx @@ -1,4 +1,6 @@ var React = require('react'); +var PropTypes = require('prop-types'); +var createClass = require('create-react-class'); function countTo(n) { var a = []; @@ -8,9 +10,9 @@ function countTo(n) { return a.join(', '); } -var Index = React.createClass({ +var Index = createClass({ propTypes: { - title: React.PropTypes.string + title: PropTypes.string }, render: function() { diff --git a/test/es6-component.jsx b/test/es6-component.jsx index 062717f..2e63ecc 100644 --- a/test/es6-component.jsx +++ b/test/es6-component.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); function countTo(n) { var a = []; @@ -8,7 +9,7 @@ function countTo(n) { return a.join(', '); } -class Index = extends React.Component { +class Index extends React.Component { render() { return (
@@ -24,7 +25,7 @@ class Index = extends React.Component { } Index.propTypes = { - title: React.PropTypes.string + title: PropTypes.string }; module.exports = Index; diff --git a/test/es6-flow-component.jsx b/test/es6-flow-component.jsx index d7c0a90..26bd060 100644 --- a/test/es6-flow-component.jsx +++ b/test/es6-flow-component.jsx @@ -1,4 +1,5 @@ const React = require('react'); +const PropTypes = require('prop-types'); // Contrived example to show how one might use Flow type annotations function countTo(n:number):string { @@ -25,7 +26,7 @@ class Index = extends React.Component { } Index.propTypes = { - title: Read.PropTypes.string + title: PropTypes.string }; module.exports = Index;