Skip to content

Commit fa16a37

Browse files
committed
Run grunt.
1 parent 5e008de commit fa16a37

File tree

7 files changed

+248
-150
lines changed

7 files changed

+248
-150
lines changed

dist/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env node
22
/*!
33
CSSLint v0.10.0
4-
Copyright (c) 2015 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
4+
Copyright (c) 2016 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
55
66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the 'Software'), to deal

dist/csslint-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
CSSLint v0.10.0
3-
Copyright (c) 2015 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
3+
Copyright (c) 2016 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
44
55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the 'Software'), to deal

dist/csslint-rhino.js

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
CSSLint v0.10.0
3-
Copyright (c) 2015 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
3+
Copyright (c) 2016 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
44
55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the 'Software'), to deal
@@ -6555,10 +6555,9 @@ exports[prop] = parserlib[prop];
65556555
}
65566556
})();
65576557

6558+
var clone = (function() {
65586559
'use strict';
65596560

6560-
var clone = (function(global) {
6561-
65626561
/**
65636562
* Clones (copies) an Object using deep copying.
65646563
*
@@ -6577,7 +6576,6 @@ var clone = (function(global) {
65776576
* @param `prototype` - sets the prototype to be used when cloning an object.
65786577
* (optional - defaults to parent prototype).
65796578
*/
6580-
65816579
function clone(parent, circular, depth, prototype) {
65826580
var filter;
65836581
if (typeof circular === 'object') {
@@ -6614,12 +6612,12 @@ function clone(parent, circular, depth, prototype) {
66146612
return parent;
66156613
}
66166614

6617-
if (isArray(parent)) {
6615+
if (clone.__isArray(parent)) {
66186616
child = [];
6619-
} else if (isRegExp(parent)) {
6620-
child = new RegExp(parent.source, clone.getRegExpFlags(parent));
6617+
} else if (clone.__isRegExp(parent)) {
6618+
child = new RegExp(parent.source, __getRegExpFlags(parent));
66216619
if (parent.lastIndex) child.lastIndex = parent.lastIndex;
6622-
} else if (isDate(parent)) {
6620+
} else if (clone.__isDate(parent)) {
66236621
child = new Date(parent.getTime());
66246622
} else if (useBuffer && Buffer.isBuffer(parent)) {
66256623
child = new Buffer(parent.length);
@@ -6651,7 +6649,7 @@ function clone(parent, circular, depth, prototype) {
66516649
if (proto) {
66526650
attrs = Object.getOwnPropertyDescriptor(proto, i);
66536651
}
6654-
6652+
66556653
if (attrs && attrs.set == null) {
66566654
continue;
66576655
}
@@ -6671,7 +6669,7 @@ function clone(parent, circular, depth, prototype) {
66716669
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
66726670
* works.
66736671
*/
6674-
clone.clonePrototype = function(parent) {
6672+
clone.clonePrototype = function clonePrototype(parent) {
66756673
if (parent === null)
66766674
return null;
66776675

@@ -6680,43 +6678,43 @@ clone.clonePrototype = function(parent) {
66806678
return new c();
66816679
};
66826680

6683-
function getRegExpFlags(re) {
6684-
var flags = '';
6685-
re.global && (flags += 'g');
6686-
re.ignoreCase && (flags += 'i');
6687-
re.multiline && (flags += 'm');
6688-
return flags;
6689-
}
6681+
// private utility functions
66906682

6691-
function objectToString(o) {
6683+
function __objToStr(o) {
66926684
return Object.prototype.toString.call(o);
6693-
}
6685+
};
6686+
clone.__objToStr = __objToStr;
66946687

6695-
function isDate(o) {
6696-
return typeof o === 'object' && objectToString(o) === '[object Date]';
6697-
}
6688+
function __isDate(o) {
6689+
return typeof o === 'object' && __objToStr(o) === '[object Date]';
6690+
};
6691+
clone.__isDate = __isDate;
66986692

6699-
function isArray(o) {
6700-
return typeof o === 'object' && objectToString(o) === '[object Array]';
6701-
}
6693+
function __isArray(o) {
6694+
return typeof o === 'object' && __objToStr(o) === '[object Array]';
6695+
};
6696+
clone.__isArray = __isArray;
67026697

6703-
function isRegExp(o) {
6704-
return typeof o === 'object' && objectToString(o) === '[object RegExp]';
6705-
}
6698+
function __isRegExp(o) {
6699+
return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
6700+
};
6701+
clone.__isRegExp = __isRegExp;
67066702

6707-
if (global.TESTING) clone.getRegExpFlags = getRegExpFlags;
6708-
if (global.TESTING) clone.objectToString = objectToString;
6709-
if (global.TESTING) clone.isDate = isDate;
6710-
if (global.TESTING) clone.isArray = isArray;
6711-
if (global.TESTING) clone.isRegExp = isRegExp;
6703+
function __getRegExpFlags(re) {
6704+
var flags = '';
6705+
if (re.global) flags += 'g';
6706+
if (re.ignoreCase) flags += 'i';
6707+
if (re.multiline) flags += 'm';
6708+
return flags;
6709+
};
6710+
clone.__getRegExpFlags = __getRegExpFlags;
67126711

67136712
return clone;
6713+
})();
67146714

6715-
})( typeof(global) === 'object' ? global :
6716-
typeof(window) === 'object' ? window : this);
6717-
6718-
if (module && module.exports)
6715+
if (typeof module === 'object' && module.exports) {
67196716
module.exports = clone;
6717+
}
67206718

67216719
/**
67226720
* Main CSSLint object.

dist/csslint-tests.js

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3203,3 +3203,109 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
32033203
}));
32043204

32053205
})();
3206+
3207+
/* jshint browser:true, loopfunc:true */
3208+
3209+
(function(){
3210+
"use strict";
3211+
3212+
window.onload = function() {
3213+
3214+
//some helpful variables
3215+
var runButton = window.document.getElementById("run"),
3216+
resultsList = window.document.getElementById("results"),
3217+
resultNode = resultsList,
3218+
events = [
3219+
YUITest.TestRunner.TEST_CASE_BEGIN_EVENT,
3220+
YUITest.TestRunner.TEST_CASE_COMPLETE_EVENT,
3221+
YUITest.TestRunner.TEST_SUITE_BEGIN_EVENT,
3222+
YUITest.TestRunner.TEST_SUITE_COMPLETE_EVENT,
3223+
YUITest.TestRunner.TEST_PASS_EVENT,
3224+
YUITest.TestRunner.TEST_FAIL_EVENT,
3225+
YUITest.TestRunner.TEST_IGNORE_EVENT,
3226+
YUITest.TestRunner.COMPLETE_EVENT,
3227+
YUITest.TestRunner.BEGIN_EVENT,
3228+
YUITest.TestRunner.ERROR_EVENT
3229+
];
3230+
3231+
for (var i=0; i < events.length; i++){
3232+
YUITest.TestRunner.attach(events[i], function(event){
3233+
var node,
3234+
message,
3235+
messageType;
3236+
3237+
switch(event.type){
3238+
case this.BEGIN_EVENT:
3239+
message = "Testing began at " + (new Date()).toString() + ".";
3240+
messageType = "info";
3241+
break;
3242+
3243+
case this.COMPLETE_EVENT:
3244+
message = "Testing completed at " + (new Date()).toString() + ".\nPassed:" +
3245+
event.results.passed + " Failed:" + event.results.failed + " Total:" + event.results.total;
3246+
messageType = "info";
3247+
break;
3248+
3249+
case this.TEST_FAIL_EVENT:
3250+
node = window.document.createElement("li");
3251+
node.className = "failed";
3252+
node.innerHTML = event.testName + ": " + event.error.getMessage().replace(/\n/g, "<br>");
3253+
resultNode.appendChild(node);
3254+
break;
3255+
3256+
case this.ERROR_EVENT:
3257+
node = window.document.createElement("li");
3258+
node.className = "error";
3259+
node.innerHTML = "ERROR: " + event.methodName + "() caused an error: " + event.error.message.replace(/\n/g, "<br>");
3260+
resultNode.appendChild(node);
3261+
break;
3262+
3263+
case this.TEST_IGNORE_EVENT:
3264+
node = window.document.createElement("li");
3265+
node.className = "ignored";
3266+
node.innerHTML = event.testName;
3267+
resultNode.appendChild(node);
3268+
break;
3269+
3270+
case this.TEST_PASS_EVENT:
3271+
node = window.document.createElement("li");
3272+
node.className = "passed";
3273+
node.innerHTML = event.testName;
3274+
resultNode.appendChild(node);
3275+
break;
3276+
3277+
case this.TEST_SUITE_BEGIN_EVENT:
3278+
node = window.document.createElement("li");
3279+
node.innerHTML = event.testSuite.name;
3280+
resultNode.appendChild(node);
3281+
resultNode = resultNode.appendChild(window.document.createElement("ul"));
3282+
break;
3283+
3284+
case this.TEST_CASE_COMPLETE_EVENT:
3285+
case this.TEST_SUITE_COMPLETE_EVENT:
3286+
resultNode.previousSibling.innerHTML += " (passed: " + event.results.passed + ", failed: " + event.results.failed + ", total: " + event.results.total + ", errors: " + event.results.errors + ", ignored: " + event.results.ignored + ")";
3287+
resultNode = resultNode.parentNode;
3288+
break;
3289+
3290+
case this.TEST_CASE_BEGIN_EVENT:
3291+
node = window.document.createElement("li");
3292+
node.innerHTML = event.testCase.name;
3293+
resultNode.appendChild(node);
3294+
resultNode = resultNode.appendChild(window.document.createElement("ul"));
3295+
break;
3296+
3297+
}
3298+
3299+
});
3300+
}
3301+
3302+
runButton.onclick = function(){
3303+
//reset the interface
3304+
resultsList.innerHTML = "";
3305+
resultNode = resultsList;
3306+
3307+
YUITest.TestRunner.run();
3308+
};
3309+
};
3310+
3311+
})();

dist/csslint-worker.js

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
CSSLint v0.10.0
3-
Copyright (c) 2015 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
3+
Copyright (c) 2016 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
44
55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the 'Software'), to deal
@@ -6551,10 +6551,9 @@ exports[prop] = parserlib[prop];
65516551
}
65526552
})();
65536553

6554+
var clone = (function() {
65546555
'use strict';
65556556

6556-
var clone = (function(global) {
6557-
65586557
/**
65596558
* Clones (copies) an Object using deep copying.
65606559
*
@@ -6573,7 +6572,6 @@ var clone = (function(global) {
65736572
* @param `prototype` - sets the prototype to be used when cloning an object.
65746573
* (optional - defaults to parent prototype).
65756574
*/
6576-
65776575
function clone(parent, circular, depth, prototype) {
65786576
var filter;
65796577
if (typeof circular === 'object') {
@@ -6610,12 +6608,12 @@ function clone(parent, circular, depth, prototype) {
66106608
return parent;
66116609
}
66126610

6613-
if (isArray(parent)) {
6611+
if (clone.__isArray(parent)) {
66146612
child = [];
6615-
} else if (isRegExp(parent)) {
6616-
child = new RegExp(parent.source, clone.getRegExpFlags(parent));
6613+
} else if (clone.__isRegExp(parent)) {
6614+
child = new RegExp(parent.source, __getRegExpFlags(parent));
66176615
if (parent.lastIndex) child.lastIndex = parent.lastIndex;
6618-
} else if (isDate(parent)) {
6616+
} else if (clone.__isDate(parent)) {
66196617
child = new Date(parent.getTime());
66206618
} else if (useBuffer && Buffer.isBuffer(parent)) {
66216619
child = new Buffer(parent.length);
@@ -6647,7 +6645,7 @@ function clone(parent, circular, depth, prototype) {
66476645
if (proto) {
66486646
attrs = Object.getOwnPropertyDescriptor(proto, i);
66496647
}
6650-
6648+
66516649
if (attrs && attrs.set == null) {
66526650
continue;
66536651
}
@@ -6667,7 +6665,7 @@ function clone(parent, circular, depth, prototype) {
66676665
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
66686666
* works.
66696667
*/
6670-
clone.clonePrototype = function(parent) {
6668+
clone.clonePrototype = function clonePrototype(parent) {
66716669
if (parent === null)
66726670
return null;
66736671

@@ -6676,43 +6674,43 @@ clone.clonePrototype = function(parent) {
66766674
return new c();
66776675
};
66786676

6679-
function getRegExpFlags(re) {
6680-
var flags = '';
6681-
re.global && (flags += 'g');
6682-
re.ignoreCase && (flags += 'i');
6683-
re.multiline && (flags += 'm');
6684-
return flags;
6685-
}
6677+
// private utility functions
66866678

6687-
function objectToString(o) {
6679+
function __objToStr(o) {
66886680
return Object.prototype.toString.call(o);
6689-
}
6681+
};
6682+
clone.__objToStr = __objToStr;
66906683

6691-
function isDate(o) {
6692-
return typeof o === 'object' && objectToString(o) === '[object Date]';
6693-
}
6684+
function __isDate(o) {
6685+
return typeof o === 'object' && __objToStr(o) === '[object Date]';
6686+
};
6687+
clone.__isDate = __isDate;
66946688

6695-
function isArray(o) {
6696-
return typeof o === 'object' && objectToString(o) === '[object Array]';
6697-
}
6689+
function __isArray(o) {
6690+
return typeof o === 'object' && __objToStr(o) === '[object Array]';
6691+
};
6692+
clone.__isArray = __isArray;
66986693

6699-
function isRegExp(o) {
6700-
return typeof o === 'object' && objectToString(o) === '[object RegExp]';
6701-
}
6694+
function __isRegExp(o) {
6695+
return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
6696+
};
6697+
clone.__isRegExp = __isRegExp;
67026698

6703-
if (global.TESTING) clone.getRegExpFlags = getRegExpFlags;
6704-
if (global.TESTING) clone.objectToString = objectToString;
6705-
if (global.TESTING) clone.isDate = isDate;
6706-
if (global.TESTING) clone.isArray = isArray;
6707-
if (global.TESTING) clone.isRegExp = isRegExp;
6699+
function __getRegExpFlags(re) {
6700+
var flags = '';
6701+
if (re.global) flags += 'g';
6702+
if (re.ignoreCase) flags += 'i';
6703+
if (re.multiline) flags += 'm';
6704+
return flags;
6705+
};
6706+
clone.__getRegExpFlags = __getRegExpFlags;
67086707

67096708
return clone;
6709+
})();
67106710

6711-
})( typeof(global) === 'object' ? global :
6712-
typeof(window) === 'object' ? window : this);
6713-
6714-
if (module && module.exports)
6711+
if (typeof module === 'object' && module.exports) {
67156712
module.exports = clone;
6713+
}
67166714

67176715
/**
67186716
* Main CSSLint object.

0 commit comments

Comments
 (0)