Skip to content

Commit

Permalink
Damn. Forgot the dist build -- fuck
Browse files Browse the repository at this point in the history
  • Loading branch information
ohager committed Feb 11, 2017
1 parent d39b22a commit df3840a
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea
node_modules
coverage


1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ notifications:
webhooks: https://ohager-nanoflux.getbadges.io/api/app/webhook/1fd7dc46-555b-443a-af2f-a705f8c74935
before_script:
- npm install -g gulp
- npm install -g istanbul
script: gulp

44 changes: 32 additions & 12 deletions dist/nanoflux.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.NanoFlux=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.NanoFlux=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
"use strict";

function ActionCreator(dispatcher, descriptor){
Expand Down Expand Up @@ -37,8 +37,8 @@ module.exports = {
return actioncreators[name];
}
};

},{}],2:[function(_dereq_,module,exports){

},{}],2:[function(_dereq_,module,exports){
"use strict";

function guaranteeArray(obj){
Expand All @@ -51,6 +51,7 @@ function Dispatcher(actions) {
this.__stores = [];
this.__handlerMapCache = {};
this.__isDispatching = false;
this.__middlewares = [];

var createActionList = function (actionArray) {

Expand Down Expand Up @@ -83,6 +84,8 @@ Dispatcher.prototype.__callAction = function(){
var handler = this.__getHandlerName(arguments[0]);
var args = Array.prototype.slice.call(arguments,1);

this.__callMiddleware(handler, args);

for (var i = 0; i < this.__stores.length; ++i) {
var store = this.__stores[i];
if(store[handler]){
Expand All @@ -97,6 +100,17 @@ Dispatcher.prototype.__registerAction = function (actionName) {
}
};


Dispatcher.prototype.__callMiddleware = function(actionName, data){
for (var i = 0; i < this.__middlewares.length; ++i) {
this.__middlewares[i].call(null, actionName, data);
}
};

Dispatcher.prototype.addMiddleware = function(fn){
this.__middlewares.push(fn);
};

Dispatcher.prototype.connectTo = function (storeArray) {

var stores = guaranteeArray(storeArray);
Expand Down Expand Up @@ -152,8 +166,8 @@ module.exports = {
return __getDispatcher(name);
}
};

},{}],3:[function(_dereq_,module,exports){

},{}],3:[function(_dereq_,module,exports){
"use strict";
var storeFactory = _dereq_('./store');
var dispatcherFactory = _dereq_('./dispatcher');
Expand Down Expand Up @@ -186,11 +200,17 @@ module.exports = {

getActions: function(name){
return actionCreatorFactory.getActions(name);
}

},
use : function(fn,dispatcher){
if(!dispatcher){
dispatcherFactory.getDispatcher().addMiddleware(fn);
}else{
dispatcher.addMiddleware(fn);
}
}
};

},{"./actioncreator":1,"./dispatcher":2,"./store":4}],4:[function(_dereq_,module,exports){

},{"./actioncreator":1,"./dispatcher":2,"./store":4}],4:[function(_dereq_,module,exports){
"use strict";

function Subscription(subscriber, arr) {
Expand Down Expand Up @@ -250,7 +270,7 @@ module.exports = {

};


},{}]},{},[3])
(3)

},{}]},{},[3])
(3)
});
2 changes: 1 addition & 1 deletion dist/nanoflux.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nanoflux",
"description": "nanoflux is a very lightweight (about 3 KiB!) agnostic full Flux implementation.",
"version": "1.1.0",
"version": "1.1.1",
"author": "Oliver Hager",
"email": "oliver@devbutze.com",
"private": false,
Expand All @@ -28,6 +28,7 @@
},
"scripts": {
"test": "node ./node_modules/jasmine-node/lib/jasmine-node/cli.js ./spec --verbose",
"benchmark": "node ./perf/benchmark.js"
"benchmark": "node ./perf/benchmark.js",
"release" : "gulp"
}
}

0 comments on commit df3840a

Please sign in to comment.