Skip to content

Commit

Permalink
Merge pull request facebook#54 from kimagure/use-npm-flux
Browse files Browse the repository at this point in the history
Remove duplicate Dispatcher code in examples
  • Loading branch information
fisherwebdev committed Sep 9, 2014
2 parents c58b025 + 8b5d160 commit 6ac5556
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 607 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ Flux is more of a pattern than a framework, and does not have any hard dependenc


## Installing Flux
Flux is available as a [npm module](https://www.npmjs.org/package/flux), so you can add it to your package.json file or run `npm install flux`. The dispatcher will be available as Flux.Dispatcher.
Flux is available as a [npm module](https://www.npmjs.org/package/flux), so you can add it to your package.json file or run `npm install flux`. The dispatcher will be available as `Flux.Dispatcher` and can be required like this:

```javascript
var Dispatcher = require('flux').Dispatcher;
```


## Building Flux from a Cloned Repo
Expand Down
2 changes: 1 addition & 1 deletion examples/flux-chat/js/dispatcher/ChatAppDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

var ChatConstants = require('../constants/ChatConstants');
var Dispatcher = require('./Dispatcher');
var Dispatcher = require('flux').Dispatcher;
var copyProperties = require('react/lib/copyProperties');

var PayloadSources = ChatConstants.PayloadSources;
Expand Down
248 changes: 0 additions & 248 deletions examples/flux-chat/js/dispatcher/Dispatcher.js

This file was deleted.

53 changes: 0 additions & 53 deletions examples/flux-chat/js/dispatcher/invariant.js

This file was deleted.

1 change: 1 addition & 0 deletions examples/flux-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"repository": "https://github.com/facebook/flux",
"main": "js/app.js",
"dependencies": {
"flux": "^2.0.0",
"react": "~0.11"
},
"devDependencies": {
Expand Down
4 changes: 1 addition & 3 deletions examples/flux-todomvc/js/dispatcher/AppDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
* A singleton that operates as the central hub for application updates.
*/

var Dispatcher = require('./Dispatcher');

var Dispatcher = require('flux').Dispatcher;
var copyProperties = require('react/lib/copyProperties');

var AppDispatcher = copyProperties(new Dispatcher(), {

/**
Expand Down
Loading

0 comments on commit 6ac5556

Please sign in to comment.