Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to externalize react/addons for newer versions of React #338

Merged
merged 1 commit into from
Apr 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install && npm run react:14
```


### Switching between React 0.14 and React 0.13
### Switching between React 15, React 0.14 and React 0.13

```bash
# switch to React 0.13
Expand All @@ -34,6 +34,11 @@ npm run react:13
npm run react:14
```

```bash
# switch to React 15
npm run react:15
```


### Running Tests

Expand Down Expand Up @@ -86,8 +91,8 @@ Before you submit a pull request from your forked repo, check that it meets thes
1. If the pull request fixes a bug, it should include tests that fail without the changes, and pass
with them.
1. If the pull request adds functionality, the docs should be updated as part of the same PR.
1. The pull request should work for both React 0.14 and React 0.13. The CI server should run the
tests in both versions automatically when you push the PR, but if you'd like to check locally, you
1. The pull request should work for React 15, React 0.14 and React 0.13. The CI server should run the
tests in all versions automatically when you push the PR, but if you'd like to check locally, you
can do so (see above).
1. Please rebase and resolve all conflicts before submitting.

2 changes: 2 additions & 0 deletions docs/guides/browserify.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ In your browserify configuration, you simply need to make sure that the followin
labeled as "external", which means they will be ignored:

```
react/addons
react/lib/ReactContext
react/lib/ExecutionEnvironment
```
Expand All @@ -26,6 +27,7 @@ var browserify = require('browserify');
var b = browserify();

// make sure to mark these as external!
b.external('react/addons');
b.external('react/lib/ReactContext');
b.external('react/lib/ExecutionEnvironment');

Expand Down
2 changes: 2 additions & 0 deletions docs/guides/karma.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ webpack: { //kind of a copy of your webpack config
},
externals: {
'cheerio': 'window',
'react/addons': true,
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true
}
Expand All @@ -49,6 +50,7 @@ browserify: {
],
configure: function(bundle) {
bundle.on('prebundle', function() {
bundle.external('react/addons');
bundle.external('react/lib/ReactContext');
bundle.external('react/lib/ExecutionEnvironment');
});
Expand Down