Skip to content
Browse files

Release v0.10.0

  • Loading branch information...
1 parent 8930035 commit f1ef64d7cee8f174151db42447dedd3c4ece91c2 @stubbornella stubbornella committed
Showing with 2,839 additions and 27,266 deletions.
  1. +47 −0 CHANGELOG
  2. +3 −3 package.json
  3. +0 −12,187 release/csslint-node-tests.js
  4. +8 −6,360 release/csslint-node.js
  5. +677 −581 release/csslint-rhino.js
  6. +41 −7 release/csslint-tests.js
  7. +620 −565 release/csslint-worker.js
  8. +684 −583 release/csslint-wsh.js
  9. +620 −566 release/csslint.js
  10. +82 −27 release/npm/cli.js
  11. +8 −6,360 release/npm/lib/csslint-node.js
  12. +49 −27 release/npm/package.json
View
47 CHANGELOG
@@ -1,3 +1,50 @@
+August 15, 2013 - v0.10.0
+
+* Update README.md (Nicole Sullivan)
+* Merge pull request #379 from nschonni/remove-old-node-compat (Nicole Sullivan)
+* Bump minimum Node version to 0.8 and add CI tests (Nick Schonning)
+* Adding contributors to the README.md (Nicole Sullivan)
+* Merge pull request #368 from nschonni/add-grunt-build (Nicole Sullivan)
+* Bump devDependencies (Nick Schonning)
+* Add bug URL to package.json (Nick Schonning)
+* Merge pull request #376 from dmethvin/optional-rc (Nicole Sullivan)
+* Add Full license block banner (Nick Schonning)
+* Alias build directory (Nick Schonning)
+* Minor fixes from code review by @jaredwy (Nick Schonning)
+* Inline YUITest CLI to standardize output (Nick Schonning)
+* Add Rhino test task (Nick Schonning)
+* Fix concat targets (Nick Schonning)
+* Add release task (Nick Schonning)
+* Add clean task (Nick Schonning)
+* Add back testrunner.html test javascript file (Nick Schonning)
+* Update Travis and NPM building (Nick Schonning)
+* Remove Uglify task (Nick Schonning)
+* Add YUITest custom task (Nick Schonning)
+* Add .gitattibutes for line endings (Nick Schonning)
+* Add parser-lib concatination (Nick Schonning)
+* Fix package.json path for Ant (Nick Schonning)
+* Fix linting errors in tests (Nick Schonning)
+* Add concat tasks (Nick Schonning)
+* Suppress new errors caused by latest JSHint (Nick Schonning)
+* Fix indenting and add .editorconfig (Nick Schonning)
+* Scaffold Gruntfile and add node dependencies (Nick Schonning)
+* Ensure node modules won't get checked in (Nick Schonning)
+* Move package.json to project root (Nick Schonning)
+* Fix #364. In WSH, return empty string for files not found. (Dave Methvin)
+* Merge pull request #353 from jklein/master (Nicholas C. Zakas)
+* Merge remote-tracking branch 'upstream/master' (Jonathan Klein)
+* Removing an unneeded line which was causing the CLI option validation to fail (jklein)
+* Merge pull request #352 from vomitcuddle/patch-1 (Nicholas C. Zakas)
+* drop os property from package.json (vomitcuddle)
+* Merge pull request #351 from jklein/master (Nicholas C. Zakas)
+* Adding a validateOptions function and warning/exiting on invalid options (jklein)
+* Merge pull request #347 from jklein/issue345 (Nicholas C. Zakas)
+* Fixes #345 - Using absolute paths for the excluded files and the files to lint so the comparison is clean (jklein)
+* Merge pull request #340 from nschonni/patch-1 (Nicholas C. Zakas)
+* Update CONTRIBUTING.md (Nick Schonning)
+* Updated contributors (Nicholas C. Zakas)
+* Fix Travis build (Nicholas C. Zakas)
+
January 17, 2013 - v0.9.10
* Switch to using Node.js version of YUI Test (Nicholas C. Zakas)
View
6 package.json
@@ -1,13 +1,13 @@
{
"name": "csslint",
- "version": "0.9.10",
+ "version": "0.10.0",
"description": "CSSLint",
"author": {
- "name": "Nicholas C. Zakas"
+ "name": "Nicole Sullivan"
},
"contributors": [
{
- "name": "Nicole Sullivan"
+ "name": "Nicholas C. Zakas"
}
],
"engines": {
View
12,187 release/csslint-node-tests.js
0 additions, 12,187 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
6,368 release/csslint-node.js
8 additions, 6,360 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,258 release/csslint-rhino.js
677 additions, 581 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
48 release/csslint-tests.js
@@ -31,6 +31,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint, Reporter*/
@@ -67,6 +68,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -111,6 +113,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -158,6 +161,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -200,6 +204,7 @@
}
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -254,6 +259,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -297,6 +303,7 @@
}
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -333,6 +340,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -364,6 +372,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -583,11 +592,6 @@
},
"Using height when border-bottom is zero should not result in a warning": function(){
- var result = CSSLint.verify(".foo { height: 100px; border-bottom: 0px; }", { "box-model": 1 });
- Assert.areEqual(0, result.messages.length);
- },
-
- "Using height when border-bottom is zero should not result in a warning": function(){
var result = CSSLint.verify(".foo { height: 100px; border-bottom: 0; }", { "box-model": 1 });
Assert.areEqual(0, result.messages.length);
}
@@ -595,6 +599,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -618,6 +623,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -723,6 +729,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -775,6 +782,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -988,6 +996,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -1013,6 +1022,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -1067,6 +1077,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -1085,6 +1096,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -1102,6 +1114,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -1999,6 +2012,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2034,6 +2048,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2062,6 +2077,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2092,6 +2108,7 @@
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2144,6 +2161,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2169,6 +2187,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2187,6 +2206,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2214,6 +2234,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2258,6 +2279,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2308,6 +2330,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2349,6 +2372,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2368,6 +2392,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2420,6 +2445,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2440,7 +2466,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
j = i * 4;
css3 += ".selector" + (j+1) + ", .selector" + (j+2) + ", .selector" + (j+3) + ", .selector" + (j+4) + " { background:red; } ";
}
- css3 += ".selector4093 { background:red; }.selector4094, .selector4095 { background:red; } "
+ css3 += ".selector4093 { background:red; }.selector4094, .selector4095 { background:red; } ";
// create css4, which has 1024 rules and 4096 selectors
for (i = 0; i <= 1023; i++) {
@@ -2508,7 +2534,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
j = i * 4;
css3 += ".selector" + (j+1) + ", .selector" + (j+2) + ", .selector" + (j+3) + ", .selector" + (j+4) + " { background:red; } ";
}
- css3 += ".selector4093 { background:red; }.selector4094, .selector4095 { background:red; } "
+ css3 += ".selector4093 { background:red; }.selector4094, .selector4095 { background:red; } ";
// create css4, which has 1024 rules and 4096 selectors
for (i = 0; i <= 1023; i++) {
@@ -2583,6 +2609,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2607,6 +2634,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2662,6 +2690,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2686,6 +2715,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2733,6 +2763,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2764,6 +2795,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2801,6 +2833,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
@@ -2877,6 +2910,7 @@ background: -o-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
}));
})();
+
(function(){
/*global YUITest, CSSLint*/
View
1,185 release/csslint-worker.js
620 additions, 565 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,267 release/csslint-wsh.js
684 additions, 583 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,186 release/csslint.js
620 additions, 566 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
109 release/npm/cli.js
@@ -1,12 +1,46 @@
#!/usr/bin/env node
-/* Build time: 17-January-2013 10:55:01 */
-/*
+/*!
+CSSLint
+Copyright (c) 2013 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+/* Build: v0.10.0 15-August-2013 01:07:22 *//*
* Encapsulates all of the CLI functionality. The api argument simply
* provides environment-specific functionality.
*/
/*global CSSLint*/
function cli(api){
+ var globalOptions = {
+ "help" : { "format" : "", "description" : "Displays this information."},
+ "format" : { "format" : "<format>", "description" : "Indicate which format to use for output."},
+ "list-rules" : { "format" : "", "description" : "Outputs all of the rules available."},
+ "quiet" : { "format" : "", "description" : "Only output when errors are present."},
+ "errors" : { "format" : "<rule[,rule]+>", "description" : "Indicate which rules to include as errors."},
+ "warnings" : { "format" : "<rule[,rule]+>", "description" : "Indicate which rules to include as warnings."},
+ "ignore" : { "format" : "<rule[,rule]+>", "description" : "Indicate which rules to ignore completely."},
+ "exclude-list": { "format" : "<file|dir[,file|dir]+>", "description" : "Indicate which files/directories to exclude from being linted."},
+ "version" : { "format" : "", "description" : "Outputs the current version number."}
+ };
+
//-------------------------------------------------------------------------
// Helper functions
//-------------------------------------------------------------------------
@@ -78,7 +112,8 @@ function cli(api){
function filterFiles(files, options) {
var excludeList = options["exclude-list"],
excludeFiles = [],
- filesToLint = files;
+ filesToLint = files.map(api.getFullPath),
+ fullPath;
if (excludeList) {
@@ -93,8 +128,9 @@ function cli(api){
// Remove the excluded files from the list of files to lint
excludeFiles.forEach(function(value){
- if (filesToLint.indexOf(value) > -1) {
- filesToLint.splice(filesToLint.indexOf(value),1);
+ fullPath = api.getFullPath(value);
+ if (filesToLint.indexOf(fullPath) > -1) {
+ filesToLint.splice(filesToLint.indexOf(fullPath),1);
}
});
}
@@ -158,20 +194,35 @@ function cli(api){
* @return {void}
*/
function outputHelp(){
+ var lenToPad = 40,
+ toPrint = '',
+ formatString = '';
+
api.print([
"\nUsage: csslint-rhino.js [options]* [file|dir]*",
" ",
- "Global Options",
- " --help Displays this information.",
- " --format=<format> Indicate which format to use for output.",
- " --list-rules Outputs all of the rules available.",
- " --quiet Only output when errors are present.",
- " --errors=<rule[,rule]+> Indicate which rules to include as errors.",
- " --warnings=<rule[,rule]+> Indicate which rules to include as warnings.",
- " --ignore=<rule[,rule]+> Indicate which rules to ignore completely.",
- " --exclude-list=<file|dir[,file|dir]+> Indicate which files/directories to exclude from being linted.",
- " --version Outputs the current version number."
- ].join("\n") + "\n");
+ "Global Options"
+ ].join("\n"));
+
+ for (var optionName in globalOptions) {
+ if (globalOptions.hasOwnProperty(optionName)) {
+ // Print the option name and the format if present
+ toPrint += " --" + optionName;
+ if (globalOptions[optionName].format !== "") {
+ formatString = '=' + globalOptions[optionName].format;
+ toPrint += formatString;
+ } else {
+ formatString = '';
+ }
+
+ // Pad out with the appropriate number of spaces
+ toPrint += new Array(lenToPad - (optionName.length + formatString.length)).join(' ');
+
+ // Print the description
+ toPrint += globalOptions[optionName].description + "\n";
+ }
+ }
+ api.print(toPrint);
}
/**
@@ -230,7 +281,6 @@ function cli(api){
while(arg){
if (arg.indexOf("--") === 0){
argName = arg.substring(2);
- options[argName] = true;
if (argName.indexOf("=") > -1){
parts = argName.split("=");
@@ -255,6 +305,16 @@ function cli(api){
return options;
}
+ function validateOptions(options) {
+ for (var option_key in options) {
+ if (!globalOptions.hasOwnProperty(option_key) && option_key !== 'files') {
+ api.print(option_key + ' is not a valid option. Exiting...');
+ outputHelp();
+ api.quit(0);
+ }
+ }
+ }
+
function readConfigFile(options) {
var data = api.readFile(api.getFullPath(".csslintrc"));
if (data) {
@@ -285,6 +345,9 @@ function cli(api){
api.quit(0);
}
+ // Validate options
+ validateOptions(options);
+
if (options.version){
api.print("v" + CSSLint.version);
api.quit(0);
@@ -297,6 +360,7 @@ function cli(api){
api.quit(processFiles(options.files,options));
}
+
/*
* CSSLint Node.js Command Line Interface
*/
@@ -316,16 +380,7 @@ cli({
},
quit: function(code){
-
- //Workaround for https://github.com/joyent/node/issues/1669
-
- if ((!process.stdout.flush || !process.stdout.flush()) && (parseFloat(process.versions.node) < 0.5)) {
- process.once("drain", function () {
- process.exit(code || 0);
- });
- } else {
- process.exit(code || 0);
- }
+ process.exit(code || 0);
},
isDirectory: function(name){
View
6,368 release/npm/lib/csslint-node.js
8 additions, 6,360 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
76 release/npm/package.json
@@ -1,30 +1,52 @@
{
- "name": "csslint",
- "version": "0.9.10",
- "description": "CSSLint",
- "author": "Nicholas C. Zakas",
- "os": ["darwin", "linux", "win32"],
- "contributors": [
- "Nicole Sullivan"
- ],
- "engines": {
- "node" : ">=0.2.0"
- },
- "directories": {
- "lib" : "lib"
- },
- "main": "./lib/csslint-node.js",
- "bin": {
- "csslint": "./cli.js"
- },
- "licenses":[
- {
- "type" : "MIT",
- "url" : "https://github.com/stubbornella/csslint/blame/master/LICENSE"
- }
- ],
- "repository": {
- "type":"git",
- "url":"http://github.com/stubbornella/csslint.git"
+ "name": "csslint",
+ "version": "0.10.0",
+ "description": "CSSLint",
+ "author": {
+ "name": "Nicole Sullivan"
+ },
+ "contributors": [
+ {
+ "name": "Nicholas C. Zakas"
}
+ ],
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "directories": {
+ "lib": "lib"
+ },
+ "main": "./lib/csslint-node.js",
+ "bin": {
+ "csslint": "./cli.js"
+ },
+ "scripts": {
+ "test": "grunt test"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/stubbornella/csslint/blob/master/LICENSE"
+ }
+ ],
+ "bugs": {
+ "url": "https://github.com/stubbornella/csslint/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/stubbornella/csslint.git"
+ },
+ "dependencies": {
+ "parserlib": "~0.2.2"
+ },
+ "devDependencies": {
+ "grunt": "~0.4.1",
+ "grunt-contrib-jshint": "~0.5.4",
+ "grunt-contrib-concat": "~0.3.0",
+ "grunt-contrib-watch": "~0.4.4",
+ "yuitest": "~0.7.9",
+ "grunt-contrib-clean": "~0.4.1",
+ "grunt-contrib-copy": "~0.4.1",
+ "grunt-include-replace": "~0.4.0"
+ }
}

0 comments on commit f1ef64d

Please sign in to comment.
Something went wrong with that request. Please try again.