Skip to content

Commit

Permalink
using latest nuclear
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdjs committed May 18, 2016
1 parent 68b8363 commit a8d233f
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 71 deletions.
8 changes: 4 additions & 4 deletions dev/component/alloy_lever/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,14 @@ App.componentRes['component/alloy_lever/index.html'] =
if (isAvailable) {
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304) {
try {
self.option.xhrs.push({
self.option.xhrs.realPush({
method: xhr.alloyLeverMethod,
rqsUrl: xhr.alloyLeverUrl,
rspUrl: xhr.responseURL,
json: JSON.stringify(JSON.parse(xhr.responseText), null, "\t")
})
} catch (e) {
self.option.xhrs.push({
self.option.xhrs.realPush({
method: xhr.alloyLeverMethod,
rqsUrl: xhr.alloyLeverUrl,
rspUrl: xhr.responseURL,
Expand Down Expand Up @@ -377,7 +377,7 @@ App.componentRes['component/alloy_lever/index.html'] =
var data = timing.printSimpleTable();
for (var key in data) {
if(data.hasOwnProperty(key)) {
this.option.timeline.push({msg: key + ': ' + Math.round(data[key])});
this.option.timeline.realPush({msg: key + ': ' + Math.round(data[key])});
}
}
},
Expand Down Expand Up @@ -430,7 +430,7 @@ App.componentRes['component/alloy_lever/index.html'] =
event.stopPropagation();
},
log: function (msg, type) {
this.option.logs.push({type: type, msg: msg});
this.option.logs.realPush({type: type, msg: msg});
},
show: function () {
this.option.hide = false;
Expand Down
22 changes: 4 additions & 18 deletions dev/js/nuclear.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Nuclear v0.2.6
/* Nuclear v0.2.8
* By AlloyTeam http://www.alloyteam.com/
* Github: https://github.com/AlloyTeam/Nuclear
* MIT Licensed.
Expand Down Expand Up @@ -2400,6 +2400,9 @@ Nuclear.instances = {};
}
return result;
};
target['real'+item.substring(0,1).toUpperCase()+item.substring(1)] = function () {
return Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));
};
});
},
"watch": function (target, prop, path) {
Expand Down Expand Up @@ -2461,23 +2464,6 @@ Nuclear.instances = {};
}
observe.isFunction = function (obj) {
return Object.prototype.toString.call(obj) == '[object Function]';
}
observe.twoWay = function (objA, aProp, objB, bProp) {
if (typeof objA[aProp] === "object" && typeof objB[bProp] === "object") {
observe(objA, aProp, function (name, value) {
objB[bProp] = this[aProp];
})
observe(objB, bProp, function (name, value) {
objA[aProp] = this[bProp];
})
} else {
observe(objA, aProp, function (name, value) {
objB[bProp] = value;
})
observe(objB, bProp, function (name, value) {
objA[aProp] = value;
})
}
}
observe._getRootName=function(prop,path){
if(path==="#"){
Expand Down
30 changes: 8 additions & 22 deletions dist/alloy_lever.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Nuclear v0.2.6
/* Nuclear v0.2.8
* By AlloyTeam http://www.alloyteam.com/
* Github: https://github.com/AlloyTeam/Nuclear
* MIT Licensed.
Expand Down Expand Up @@ -2400,6 +2400,9 @@ Nuclear.instances = {};
}
return result;
};
target['real'+item.substring(0,1).toUpperCase()+item.substring(1)] = function () {
return Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));
};
});
},
"watch": function (target, prop, path) {
Expand Down Expand Up @@ -2461,23 +2464,6 @@ Nuclear.instances = {};
}
observe.isFunction = function (obj) {
return Object.prototype.toString.call(obj) == '[object Function]';
}
observe.twoWay = function (objA, aProp, objB, bProp) {
if (typeof objA[aProp] === "object" && typeof objB[bProp] === "object") {
observe(objA, aProp, function (name, value) {
objB[bProp] = this[aProp];
})
observe(objB, bProp, function (name, value) {
objA[aProp] = this[bProp];
})
} else {
observe(objA, aProp, function (name, value) {
objB[bProp] = value;
})
observe(objB, bProp, function (name, value) {
objA[aProp] = value;
})
}
}
observe._getRootName=function(prop,path){
if(path==="#"){
Expand Down Expand Up @@ -3025,14 +3011,14 @@ App.componentRes['component/alloy_lever/index.html'] =
if (isAvailable) {
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304) {
try {
self.option.xhrs.push({
self.option.xhrs.realPush({
method: xhr.alloyLeverMethod,
rqsUrl: xhr.alloyLeverUrl,
rspUrl: xhr.responseURL,
json: JSON.stringify(JSON.parse(xhr.responseText), null, "\t")
})
} catch (e) {
self.option.xhrs.push({
self.option.xhrs.realPush({
method: xhr.alloyLeverMethod,
rqsUrl: xhr.alloyLeverUrl,
rspUrl: xhr.responseURL,
Expand Down Expand Up @@ -3140,7 +3126,7 @@ App.componentRes['component/alloy_lever/index.html'] =
var data = timing.printSimpleTable();
for (var key in data) {
if(data.hasOwnProperty(key)) {
this.option.timeline.push({msg: key + ': ' + Math.round(data[key])});
this.option.timeline.realPush({msg: key + ': ' + Math.round(data[key])});
}
}
},
Expand Down Expand Up @@ -3193,7 +3179,7 @@ App.componentRes['component/alloy_lever/index.html'] =
event.stopPropagation();
},
log: function (msg, type) {
this.option.logs.push({type: type, msg: msg});
this.option.logs.realPush({type: type, msg: msg});
},
show: function () {
this.option.hide = false;
Expand Down
6 changes: 3 additions & 3 deletions dist/alloy_lever.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var header = require('gulp-header');
var version = require('./package.json').version;

var headerComment = '/* AlloyLever\n'+
var headerComment = '/* AlloyLever v'+version+'\n'+
' * By AlloyTeam http://www.alloyteam.com/\n'+
' * Github: https://github.com/AlloyTeam/AlloyLever\n'+
' * MIT Licensed.\n' +
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alloylever",
"version": "0.1.4",
"version": "0.1.5",
"description": "Mobile Web Developer Tool.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
8 changes: 4 additions & 4 deletions src/component/alloy_lever/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
if (isAvailable) {
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304) {
try {
self.option.xhrs.push({
self.option.xhrs.realPush({
method: xhr.alloyLeverMethod,
rqsUrl: xhr.alloyLeverUrl,
rspUrl: xhr.responseURL,
json: JSON.stringify(JSON.parse(xhr.responseText), null, "\t")
})
} catch (e) {
self.option.xhrs.push({
self.option.xhrs.realPush({
method: xhr.alloyLeverMethod,
rqsUrl: xhr.alloyLeverUrl,
rspUrl: xhr.responseURL,
Expand Down Expand Up @@ -158,7 +158,7 @@
var data = timing.printSimpleTable();
for (var key in data) {
if(data.hasOwnProperty(key)) {
this.option.timeline.push({msg: key + ': ' + Math.round(data[key])});
this.option.timeline.realPush({msg: key + ': ' + Math.round(data[key])});
}
}
},
Expand Down Expand Up @@ -211,7 +211,7 @@
event.stopPropagation();
},
log: function (msg, type) {
this.option.logs.push({type: type, msg: msg});
this.option.logs.realPush({type: type, msg: msg});
},
show: function () {
this.option.hide = false;
Expand Down
22 changes: 4 additions & 18 deletions src/js/nuclear.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Nuclear v0.2.6
/* Nuclear v0.2.8
* By AlloyTeam http://www.alloyteam.com/
* Github: https://github.com/AlloyTeam/Nuclear
* MIT Licensed.
Expand Down Expand Up @@ -2400,6 +2400,9 @@ Nuclear.instances = {};
}
return result;
};
target['real'+item.substring(0,1).toUpperCase()+item.substring(1)] = function () {
return Array.prototype[item].apply(this, Array.prototype.slice.call(arguments));
};
});
},
"watch": function (target, prop, path) {
Expand Down Expand Up @@ -2461,23 +2464,6 @@ Nuclear.instances = {};
}
observe.isFunction = function (obj) {
return Object.prototype.toString.call(obj) == '[object Function]';
}
observe.twoWay = function (objA, aProp, objB, bProp) {
if (typeof objA[aProp] === "object" && typeof objB[bProp] === "object") {
observe(objA, aProp, function (name, value) {
objB[bProp] = this[aProp];
})
observe(objB, bProp, function (name, value) {
objA[aProp] = this[bProp];
})
} else {
observe(objA, aProp, function (name, value) {
objB[bProp] = value;
})
observe(objB, bProp, function (name, value) {
objA[aProp] = value;
})
}
}
observe._getRootName=function(prop,path){
if(path==="#"){
Expand Down

0 comments on commit a8d233f

Please sign in to comment.