This repository has been archived by the owner on Mar 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chris Ferdinandi
committed
Aug 8, 2014
1 parent
ceaf595
commit f7c5d80
Showing
12 changed files
with
415 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/** gulp-boilerplate v0.2.1, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ | ||
/** gulp-boilerplate v0.2.2, by Chris Ferdinandi | http://github.com/cferdinandi/Plugin | Licensed under MIT: http://gomakethings.com/mit/ */ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* gulp-boilerplate v0.2.2 | ||
* My Gulp.js boilerplate for creating new web projects, by Chris Ferdinandi. | ||
* http://github.com/cferdinandi/Plugin | ||
* | ||
* Free to use under the MIT License. | ||
* http://gomakethings.com/mit/ | ||
*/ | ||
|
||
/* | ||
* Polyfill Function.prototype.bind support for otherwise ECMA Script 5 compliant browsers | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Compatibility | ||
*/ | ||
|
||
if (!Function.prototype.bind) { | ||
Function.prototype.bind = function (oThis) { | ||
if (typeof this !== "function") { | ||
// closest thing possible to the ECMAScript 5 | ||
// internal IsCallable function | ||
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); | ||
} | ||
|
||
var aArgs = Array.prototype.slice.call(arguments, 1); | ||
var fToBind = this; | ||
fNOP = function () {}; | ||
fBound = function () { | ||
return fToBind.apply(this instanceof fNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); | ||
}; | ||
|
||
fNOP.prototype = this.prototype; | ||
fBound.prototype = new fNOP(); | ||
|
||
return fBound; | ||
}; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
/** | ||
* gulp-boilerplate v0.2.2 | ||
* My Gulp.js boilerplate for creating new web projects, by Chris Ferdinandi. | ||
* http://github.com/cferdinandi/Plugin | ||
* | ||
* Free to use under the MIT License. | ||
* http://gomakethings.com/mit/ | ||
*/ | ||
|
||
/* | ||
* classList.js: Cross-browser full element.classList implementation. | ||
* 2014-01-31 | ||
* | ||
* By Eli Grey, http://eligrey.com | ||
* Public Domain. | ||
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | ||
*/ | ||
|
||
/*global self, document, DOMException */ | ||
|
||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ | ||
|
||
if ("document" in self && !("classList" in document.createElement("_"))) { | ||
|
||
(function (view) { | ||
|
||
"use strict"; | ||
|
||
if (!('Element' in view)) return; | ||
|
||
var | ||
classListProp = "classList", | ||
protoProp = "prototype", | ||
elemCtrProto = view.Element[protoProp], | ||
objCtr = Object, | ||
strTrim = String[protoProp].trim || function () { | ||
return this.replace(/^\s+|\s+$/g, ""); | ||
}, | ||
arrIndexOf = Array[protoProp].indexOf || function (item) { | ||
var | ||
i = 0, | ||
len = this.length; | ||
for (; i < len; i++) { | ||
if (i in this && this[i] === item) { | ||
return i; | ||
} | ||
} | ||
return -1; | ||
}, | ||
// Vendors: please allow content code to instantiate DOMExceptions | ||
DOMEx = function (type, message) { | ||
this.name = type; | ||
this.code = DOMException[type]; | ||
this.message = message; | ||
}, | ||
checkTokenAndGetIndex = function (classList, token) { | ||
if (token === "") { | ||
throw new DOMEx( | ||
"SYNTAX_ERR", | ||
"An invalid or illegal string was specified" | ||
); | ||
} | ||
if (/\s/.test(token)) { | ||
throw new DOMEx( | ||
"INVALID_CHARACTER_ERR", | ||
"String contains an invalid character" | ||
); | ||
} | ||
return arrIndexOf.call(classList, token); | ||
}, | ||
ClassList = function (elem) { | ||
var | ||
trimmedClasses = strTrim.call(elem.getAttribute("class") || ""), | ||
classes = trimmedClasses ? trimmedClasses.split(/\s+/) : [], | ||
i = 0, | ||
len = classes.length; | ||
for (; i < len; i++) { | ||
this.push(classes[i]); | ||
} | ||
this._updateClassName = function () { | ||
elem.setAttribute("class", this.toString()); | ||
}; | ||
}, | ||
classListProto = ClassList[protoProp] = [], | ||
classListGetter = function () { | ||
return new ClassList(this); | ||
}; | ||
// Most DOMException implementations don't allow calling DOMException's toString() | ||
// on non-DOMExceptions. Error's toString() is sufficient here. | ||
DOMEx[protoProp] = Error[protoProp]; | ||
classListProto.item = function (i) { | ||
return this[i] || null; | ||
}; | ||
classListProto.contains = function (token) { | ||
token += ""; | ||
return checkTokenAndGetIndex(this, token) !== -1; | ||
}; | ||
classListProto.add = function () { | ||
var | ||
tokens = arguments, | ||
i = 0, | ||
l = tokens.length, | ||
token, | ||
updated = false; | ||
do { | ||
token = tokens[i] + ""; | ||
if (checkTokenAndGetIndex(this, token) === -1) { | ||
this.push(token); | ||
updated = true; | ||
} | ||
} | ||
while (++i < l); | ||
|
||
if (updated) { | ||
this._updateClassName(); | ||
} | ||
}; | ||
classListProto.remove = function () { | ||
var | ||
tokens = arguments, | ||
i = 0, | ||
l = tokens.length, | ||
token, | ||
updated = false; | ||
do { | ||
token = tokens[i] + ""; | ||
var index = checkTokenAndGetIndex(this, token); | ||
if (index !== -1) { | ||
this.splice(index, 1); | ||
updated = true; | ||
} | ||
} | ||
while (++i < l); | ||
|
||
if (updated) { | ||
this._updateClassName(); | ||
} | ||
}; | ||
classListProto.toggle = function (token, force) { | ||
token += ""; | ||
|
||
var | ||
result = this.contains(token), | ||
method = result ? force !== true && "remove" : force !== false && "add"; | ||
|
||
if (method) { | ||
this[method](token); | ||
} | ||
|
||
return !result; | ||
}; | ||
classListProto.toString = function () { | ||
return this.join(" "); | ||
}; | ||
|
||
if (objCtr.defineProperty) { | ||
var classListPropDesc = { | ||
get: classListGetter, | ||
enumerable: true, | ||
configurable: true | ||
}; | ||
try { | ||
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc); | ||
} catch (ex) { // IE 8 doesn't support enumerable:true | ||
if (ex.number === -0x7FF5EC54) { | ||
classListPropDesc.enumerable = false; | ||
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc); | ||
} | ||
} | ||
} else if (objCtr[protoProp].__defineGetter__) { | ||
elemCtrProto.__defineGetter__(classListProp, classListGetter); | ||
} | ||
|
||
}(self)); | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Polyfill Function.prototype.bind support for otherwise ECMA Script 5 compliant browsers | ||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Compatibility | ||
*/ | ||
|
||
if (!Function.prototype.bind) { | ||
Function.prototype.bind = function (oThis) { | ||
if (typeof this !== "function") { | ||
// closest thing possible to the ECMAScript 5 | ||
// internal IsCallable function | ||
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); | ||
} | ||
|
||
var aArgs = Array.prototype.slice.call(arguments, 1); | ||
var fToBind = this; | ||
fNOP = function () {}; | ||
fBound = function () { | ||
return fToBind.apply(this instanceof fNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); | ||
}; | ||
|
||
fNOP.prototype = this.prototype; | ||
fBound.prototype = new fNOP(); | ||
|
||
return fBound; | ||
}; | ||
} |
Oops, something went wrong.