{"name":"flux","version":"3.1.2","description":"An application architecture based on a unidirectional data flow","keywords":["flux","react","facebook","dispatcher"],"homepage":"http://facebook.github.io/flux/","bugs":{"url":"https://github.com/facebook/flux/issues"},"files":["LICENSE","PATENTS","README.md","index.js","lib","utils.js","dist"],"main":"index.js","scripts":{"build":"gulp build","prepublish":"gulp publish","test":"NODE_ENV=test jest"},"repository":{"type":"git","url":"git+https://github.com/facebook/flux.git"},"author":{"name":"Facebook"},"contributors":[{"name":"Jing Chen","email":"jingc@fb.com"},{"name":"Bill Fisher","email":"fisherwebdev@gmail.com"},{"name":"Paul O'Shannessy","email":"paul@oshannessy.com"},{"name":"Kyle Davis","email":"kyldvs@gmail.com"}],"license":"BSD-3-Clause","devDependencies":{"babel-core":"^5.8.22","babel-loader":"^5.3.2","del":"^2.2.0","fbjs-scripts":"^0.5.0","gulp":"^3.9.0","gulp-babel":"^5.1.0","gulp-flatten":"^0.2.0","gulp-header":"1.8.2","gulp-rename":"^1.2.2","gulp-util":"^3.0.6","immutable":"^3.7.4","jest":"^15.1.1","object-assign":"^4.0.1","react":"^15.0.2","react-addons-test-utils":"^15.0.1","react-dom":"^15.0.1","run-sequence":"^1.1.0","vinyl-source-stream":"^1.0.0","webpack":"^1.11.0","webpack-stream":"^3.1.0"},"dependencies":{"fbemitter":"^2.0.0","fbjs":"^0.8.0"},"peerDependencies":{"react":"^15.0.2"},"jest":{"modulePathIgnorePatterns":["/lib/","/node_modules/"],"preprocessorIgnorePatterns":["/node_modules/"],"rootDir":"./","scriptPreprocessor":"scripts/jest/preprocessor.js","setupFiles":["scripts/jest/environment.js"],"testPathDirs":["<rootDir>/src"]},"gitHead":"a6dfedde64ea4c8190da8ddcf4486f28ca39a2d3","_id":"flux@3.1.2","_shasum":"8c170addf95b8cb2febb3ddd640aa3e24505762f","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.0","_npmUser":{"name":"kyldvs","email":"kyldvs@gmail.com"},"dist":{"shasum":"8c170addf95b8cb2febb3ddd640aa3e24505762f","tarball":"http://registry-npm.ywwl.com/flux/download/flux-3.1.2.tgz","integrity":"sha512-Uv1xq7csYMuzgcnRj8Ion8gosEKGTOf3fJSC/FWnoVy1F/ouFiMYCgQCvHzIDsA5sLG68wH84gj4IeYPVWjZZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG0tD2H3fw1HLQ0+BCYJ6NzJd31sBXtcNul5uXvUXUjaAiEAsNWlT4Kb5Kk0ds7ovT2vUooQXR9oqNXGfuxtl6acz7Y="}],"size":68773,"noattachment":false,"key":"/flux/-/flux-3.1.2.tgz"},"maintainers":[{"name":"fisherwebdev","email":"fisherwebdev@gmail.com"},{"name":"fb","email":"opensource+npm@fb.com"},{"name":"kyldvs","email":"kyldvs@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/flux-3.1.2.tgz_1481858654807_0.03631561924703419"},"directories":{},"readme":"## ⚠️ The Flux project has been archived and no further changes will be made. We recommend using more sophisticated alternatives like [Redux](http://redux.js.org/), [MobX](https://mobx.js.org/), [Recoil](https://recoiljs.org/), [Zustand](https://github.com/pmndrs/zustand), or [Jotai](https://github.com/pmndrs/jotai).\n\n<p align=\"center\">\n  <img src=\"https://github.com/facebookarchive/flux/blob/main/website/static/img/flux-logo-color.svg\" alt=\"logo\" width=\"20%\" />\n</p>\n<h1 align=\"center\">\n  Flux\n</h1>\n<p align=\"center\">\n  An application architecture for React utilizing a unidirectional data flow.<br>\n\n  <a href=\"https://github.com/facebook/flux/blob/master/LICENSE\">\n    <img src=\"https://img.shields.io/badge/License-BSD%20-blue.svg\" alt=\"Licence Badge\" />\n  </a>\n  <a href=\"https://www.npmjs.com/package/flux\">\n    <img src=\"https://img.shields.io/npm/v/flux.svg?style=flat\" alt=\"Current npm package version.\" />\n  </a>\n</p>\n\n<hr/>\n\n<img src=\"./img/flux-diagram-white-background.png\" style=\"width: 100%;\" />\n\n## Getting Started\n\nStart by looking through the [guides and examples](./examples) on Github. For more resources and API docs check out [facebook.github.io/flux](https://facebookarchive.github.io/flux).\n\n## How Flux works\n\nFor more information on how Flux works check out the [Flux Concepts](./examples/flux-concepts) guide, or the [In Depth Overview](https://facebookarchive.github.io/flux/docs/in-depth-overview).\n\n## Requirements\n\nFlux is more of a pattern than a framework, and does not have any hard dependencies. However, we often use [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter) as a basis for `Stores` and [React](https://github.com/facebook/react) for our `Views`. The one piece of Flux not readily available elsewhere is the `Dispatcher`. This module, along with some other utilities, is available here to complete your Flux toolbox.\n\n## Installing Flux\n\nFlux 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:\n\n```javascript\nconst Dispatcher = require('flux').Dispatcher;\n```\n\nTake a look at the [dispatcher API and some examples](https://facebookarchive.github.io/flux/docs/dispatcher).\n\n## Flux Utils\n\nWe have also provided some basic utility classes to help get you started with Flux. These base classes are a solid foundation for a simple Flux application, but they are **not** a feature-complete framework that will handle all use cases. There are many other great Flux frameworks out there if these utilities do not fulfill your needs.\n\n```js\nimport {ReduceStore} from 'flux/utils';\n\nclass CounterStore extends ReduceStore<number> {\n  getInitialState(): number {\n    return 0;\n  }\n\n  reduce(state: number, action: Object): number {\n    switch (action.type) {\n      case 'increment':\n        return state + 1;\n\n      case 'square':\n        return state * state;\n\n      default:\n        return state;\n    }\n  }\n}\n```\n\nCheck out the [examples](./examples) and [documentation](https://facebookarchive.github.io/flux/docs/flux-utils) for more information.\n\n## Building Flux from a Cloned Repo\n\nClone the repo and navigate into the resulting `flux` directory. Then run `npm install`.\n\nThis will run [Gulp](https://gulpjs.com/)-based build tasks automatically and produce the file Flux.js, which you can then require as a module.\n\nYou could then require the Dispatcher like so:\n\n```javascript\nconst Dispatcher = require('path/to/this/directory/Flux').Dispatcher;\n```\n\nThe build process also produces de-sugared versions of the `Dispatcher` and `invariant` modules in a `lib` directory, and you can require those modules directly, copying them into whatever directory is most convenient for you. The `flux-todomvc` and `flux-chat` example applications both do this.\n\n## License\n\nFlux is BSD-licensed. We also provide an additional patent grant.\n","publish_time":1481858655063,"_cnpm_publish_time":1481858655063,"dist-tags":{"latest":"4.0.4"}}