Comparing version 0.0.2 to 0.8.5
{ | ||
"name": "delorean", | ||
"version": "0.0.2", | ||
"description": "Modules, users and groups management", | ||
"main": "lib/delorean.js", | ||
"version": "0.8.5", | ||
"description": "Flux Library", | ||
"main": "src/delorean.js", | ||
"scripts": { | ||
"test": "node_modules/.bin/mocha --reporter spec", | ||
"test-watch": "node_modules/.bin/mocha --watch --reporter min", | ||
"build": "node_modules/.bin/coffee --compile --bare --output lib src", | ||
"build-watch": "node_modules/.bin/coffee --compile --bare --watch --output lib src", | ||
"lint": "node_modules/.bin/coffeelint -f coffeelint.json src/*.coffee", | ||
"doc": "node_modules/.bin/codo" | ||
"test": "./node_modules/.bin/grunt karma" | ||
}, | ||
"dependencies": { | ||
"flux-capacitor": "*" | ||
}, | ||
"author": "Fatih Kadir Akin", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"codo": "1", | ||
"coffee-script": "1.3", | ||
"mocha": "1", | ||
"should": "1.1", | ||
"coffeelint": "0.5" | ||
"grunt": "^0.4.5", | ||
"grunt-browserify": "^2.1.4", | ||
"grunt-cli": "^0.1.13", | ||
"grunt-contrib-concat": "^0.5.0", | ||
"grunt-contrib-connect": "^0.8.0", | ||
"grunt-contrib-jshint": "^0.10.0", | ||
"grunt-contrib-uglify": "^0.5.1", | ||
"grunt-contrib-watch": "^0.6.1", | ||
"grunt-docco": "^0.3.3", | ||
"grunt-jscs-checker": "^0.6.2", | ||
"grunt-karma": "^0.8.3", | ||
"grunt-livereload": "^0.1.3", | ||
"grunt-release": "git+https://github.com/f/grunt-release.git#c17216608469c5ecbb43458289763e09839932ba", | ||
"grunt-requirejs": "^0.4.2", | ||
"jasmine": "^2.0.1", | ||
"karma": "^0.12.22", | ||
"karma-chrome-launcher": "^0.1.4", | ||
"karma-coverage": "^0.2.6", | ||
"karma-jasmine": "^0.1.5", | ||
"karma-phantomjs-launcher": "^0.1.4" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/MacflyJS/delorean.git" | ||
}, | ||
"author": "Krash Studio", | ||
"contributors": [ | ||
"Michel Thiers <michel@kontestapp.com> (@michelthiers)", | ||
"Paul Le Cam <paul@kontestapp.com> (@paul_lecam)" | ||
], | ||
"license": "MIT" | ||
"dependencies": { | ||
"es6-promise": "^1.0.0" | ||
} | ||
} |
179
README.md
@@ -1,1 +0,178 @@ | ||
## Delorean | ||
# DeLorean.js | ||
[![Build Status](https://travis-ci.org/deloreanjs/delorean.svg?branch=master)](https://travis-ci.org/deloreanjs/delorean) | ||
[![NPM version](https://badge.fury.io/js/delorean.js.svg)](http://badge.fury.io/js/delorean.js) | ||
![Coverage](http://progressed.io/bar/84?title=coverage) | ||
DeLorean is a tiny Flux pattern implementation. | ||
- **Unidirectional data flow**, it makes your app logic **simpler than MVC**, | ||
- Automatically listens to data changes and keeps your data updated, | ||
- Makes data more **consistent** across your whole application, | ||
- It's framework agnostic, completely. There's **no view framework dependency**. | ||
- Very small, just **5K** gzipped. | ||
- Built-in **React.js** integration, easy to use with **Flight.js** and **Ractive.js** and probably all others. | ||
- Improve your UI/data consistency using **rollbacks**. | ||
### Tutorial | ||
You can learn Flux and DeLorean.js in minutes. [Read the tutorial](./docs/tutorial.md) | ||
## Using with Frameworks | ||
- [Try **React.js** example on JSFiddle](http://jsfiddle.net/fkadev/a2ms7rcc/) | ||
- [Try **Flight.js** example on JSFiddle](http://jsfiddle.net/fkadev/1cw9Leau/) | ||
- [Try **Ractive.js** example on JSFiddle](http://jsfiddle.net/PhilJ/2r1k2k90/2/) | ||
--- | ||
## Install | ||
You can install **DeLorean** with Bower: | ||
```bash | ||
bower install delorean | ||
``` | ||
You can also install by NPM to use with **Browserify** *(recommended)* | ||
```bash | ||
npm install delorean.js | ||
``` | ||
## Usage | ||
Hipster way: | ||
```js | ||
var Flux = require('delorean.js').Flux; | ||
// ... | ||
``` | ||
Old-skool way: | ||
```html | ||
<script src="//rawgit.com/f/delorean/master/dist/delorean.min.js"></script> | ||
<script> | ||
var Flux = DeLorean.Flux; | ||
// ... | ||
</script> | ||
``` | ||
## Overview | ||
```javascript | ||
/* | ||
* Stores are simple data buckets which manages data. | ||
*/ | ||
var Store = Flux.createStore({ | ||
data: null, | ||
setData: function (data) { | ||
this.data = data; | ||
this.emit('change'); | ||
}, | ||
actions: { | ||
'incoming-data': 'setData' | ||
} | ||
}); | ||
var store = new Store(); | ||
/* | ||
* Dispatchers are simple action dispatchers for stores. | ||
* Stores handle the related action. | ||
*/ | ||
var Dispatcher = Flux.createDispatcher({ | ||
setData: function (data) { | ||
this.dispatch('incoming-data', data); | ||
}, | ||
getStores: function () { | ||
return {increment: store}; | ||
} | ||
}); | ||
/* | ||
* Action Creators are simple controllers. They are simple functions. | ||
* They talk to dispatchers. They are not required. | ||
*/ | ||
var Actions = { | ||
setData: function (data) { | ||
Dispatcher.setData(data); | ||
} | ||
}; | ||
// The data cycle. | ||
store.onChange(function () { | ||
// End of data cycle. | ||
document.getElementById('result').innerText = store.store.data; | ||
}); | ||
document.getElementById('dataChanger').onclick = function () { | ||
// Start data cycle: | ||
Actions.setData(Math.random()); | ||
}; | ||
``` | ||
[Run this example on JSFiddle](http://jsfiddle.net/fkadev/40cx3146/) | ||
## Docs | ||
You can read the [tutorial](./docs/tutorial.md) to get started | ||
**DeLorean.js** with your favorite framework. | ||
### Basic Concepts | ||
- [**Store**: A postbox](./docs/stores.md) | ||
- [**Dispatcher**: The postman, drops mail in the postboxes](./docs/dispatchers.md) | ||
- [**View (or Component)**: Box owner, checks the box for mail](./docs/views.md) | ||
- [**Action Creator**: The post office, manages postmen](./docs/actions.md) | ||
Or you can visit [documents](./docs) page. | ||
## Running the TodoMVC example | ||
There is a simple TodoMVC example working with DeLorean.js | ||
```bash | ||
cd examples/todomvc | ||
grunt | ||
open index.html | ||
``` | ||
## Authors | ||
- Fatih Kadir Akin [@f](https://github.com/f) | ||
- Burak Can [@burakcan](https://github.com/burakcan) | ||
- Darcy Adams [@darcyadams](https://github.com/darcyadams) | ||
## Contributors | ||
- Quang Van [@quangv](https://github.com/quangv) | ||
- James H. Edwards [@incrediblesound](https://github.com/incrediblesound) | ||
- Fehmi Can Sağlam [@fehmicansaglam](https://github.com/fehmicansaglam) | ||
- Serge van den Oever [@svdoever](https://github.com/svdoever) | ||
- Markus Ast [@rkusa](https://github.com/rkusa) | ||
## Contribution | ||
```bash | ||
git clone git@github.com:deloreanjs/delorean.git | ||
cd delorean | ||
git checkout -b your-feature-branch | ||
``` | ||
After you make some changes and add your test cases to the `test/spec/*Spec.js` | ||
files. please run: | ||
```bash | ||
grunt | ||
grunt test | ||
``` | ||
When it's all OK, [open a pull request](https://github.com/deloreanjs/delorean/compare/). | ||
## License | ||
[MIT License](http://f.mit-license.org) | ||
## Name | ||
The **flux capacitor** was the core component of Doctor Emmett Brown's **DeLorean time machine** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 12 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
2256044
58
100
38933
1
179
20
3
186
14
+ Addedes6-promise@^1.0.0
+ Addedes6-promise@1.0.0(transitive)
- Removedflux-capacitor@*
- Removedflux-capacitor@0.3.0(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedlodash-es@4.17.21(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedredux@3.7.2(transitive)
- Removedsymbol-observable@1.2.0(transitive)