This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by narek.mamikonyan on 6/26/2014. | |
*/ | |
var config = { | |
srcDir: "src", | |
distDir: "dist", | |
tmpDir: ".tmp" | |
}; | |
var runSequence = require('run-sequence'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Support: http://caniuse.com/promises | |
function Http () { | |
/** | |
* Helper for http calls | |
* @param method | |
* @param url | |
* @param data | |
* @returns {Promise} | |
*/ | |
function makeRequest(method,url,data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.bind = function(context){ | |
var that = this, | |
slicedArgs = Array.prototype.splice.call(arguments, 1), | |
bounded = function (){ | |
var newArgs = slicedArgs.concat(Array.prototype.splice.call(arguments)); | |
return that.apply(context,newArgs); | |
} | |
bounded.prototype = that.prototype; | |
return bounded; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var root = angular.element(document.getElementsByTagName('body')); | |
var watchers = []; | |
var f = function (element) { | |
if (element.data().hasOwnProperty('$scope')) { | |
angular.forEach(element.data().$scope.$$watchers, function (watcher) { | |
watchers.push(watcher); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @description finds element by given classname inside the dom list of givent element | |
* NOTE its will return only one element | |
* @param element <HTMLElement> | |
* @param className <String> | |
* @returns {*} <HTMLElement> | |
*/ | |
function getElementByClassName(element, className) { | |
var foundedElement; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mergeArrays(a,b){ | |
var output = [],j,i; | |
for(i = 0; i< a.length; i++){ | |
output.push(a[i]); | |
for(j=0; j< b.length; j++){ | |
if(b[j] <= a[i]){ | |
output.push(b[j]); | |
b.splice(j,1); | |
} |