Remove references to autoflow, error wrapper
Fixes #1023
Paul O’Shannessy committed
Feb 10, 2014 at 14:37 UTC
6e5956195d684cec2c3a78de86fdb8d1a50dc75a
5 files changed
-55
npm-react/README.md
-8
@@ -5,18 +5,10 @@ without also requiring the JSX transformer. This is especially useful for cases
5
want to [`browserify`](https://github.com/substack/node-browserify) your module using
6
`React`.
7
8
-## The `react` npm package has recently changed!
9
-
10
-If you're looking for jeffbski's [React.js](https://github.com/jeffbski/react) project, it's now in `npm` as `autoflow` rather than `react`.
8
9
## Example Usage
10
11
```js
15
-
16
-// Previously, you might access React with react-tools.
17
-var React = require('react-tools').React;
18
-
19
-// Now you can access React directly with react-core.
12
var React = require('react');
13
14
// You can also access ReactWithAddons.
npm-react/ReactJSErrors.js
deleted
-40
@@ -1,40 +0,0 @@
1
-'use strict';
2
-
3
-var copyProperties = require('./lib/copyProperties');
4
-
5
-var WARNING_MESSAGE = (
6
- 'It looks like you\'re trying to use jeffbski\'s React.js project.\n' +
7
- 'The `react` npm package now points to the React JavaScript library for ' +
8
- 'building user interfaces, not the React.js project for managing asynchronous ' +
9
- 'control flow. If you\'re looking for that library, please npm install autoflow.'
10
-);
11
-
12
-function error() {
13
- throw new Error(WARNING_MESSAGE);
14
-}
15
-
16
-// Model the React.js project's public interface exactly.
17
-
18
-function ReactJSShim() {
19
- error();
20
-}
21
-
22
-ReactJSShim.logEvents = error;
23
-ReactJSShim.resolvePromises = error;
24
-ReactJSShim.trackTasks = error;
25
-ReactJSShim.createEventCollector = error;
26
-
27
-// These could throw using defineProperty() but supporting older browsers will
28
-// be painful. Additionally any error messages around this will contain the string
29
-// so I think this is sufficient.
30
-ReactJSShim.options = WARNING_MESSAGE;
31
-ReactJSShim.events = WARNING_MESSAGE;
32
-
33
-var ReactJSErrors = {
34
- wrap: function(module) {
35
- copyProperties(ReactJSShim, module);
36
- return ReactJSShim;
37
- }
38
-};
39
-
40
-module.exports = ReactJSErrors;
npm-react/addons.js
-3
@@ -1,4 +1 @@
1
module.exports = require('./lib/ReactWithAddons');
2
-if ('production' !== process.env.NODE_ENV) {
3
- module.exports = require('./ReactJSErrors').wrap(module.exports);
4
-}
npm-react/package.json
-1
@@ -16,7 +16,6 @@
16
"README.md",
17
"addons.js",
18
"react.js",
19
- "ReactJSErrors.js",
19
"lib/"
20
],
21
"main": "react.js",
npm-react/react.js
-3
@@ -1,4 +1 @@
1
module.exports = require('./lib/React');
2
-if ('production' !== process.env.NODE_ENV) {
3
- module.exports = require('./ReactJSErrors').wrap(module.exports);
4
-}