From 2a4c43b55d2aaccd49544128d4c53dc9aaea1c11 Mon Sep 17 00:00:00 2001 From: Peter Keating Date: Thu, 20 Feb 2014 23:36:05 +0000 Subject: [PATCH 1/6] updated to grunt 0.4.2. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c94d45a..9a1ed09 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "test": "grunt" }, "devDependencies": { - "grunt": "~0.4.1", + "grunt": "~0.4.2", "grunt-contrib-jshint": "~0.4.3" }, "keywords": [ From 7bb86438a2bd47e66a9deb1f4b39e58f54b93689 Mon Sep 17 00:00:00 2001 From: Peter Keating Date: Thu, 20 Feb 2014 23:36:50 +0000 Subject: [PATCH 2/6] fixed bug causing task to fail when processing extremely large CSS files. --- tasks/csscss.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tasks/csscss.js b/tasks/csscss.js index cfb49e6..2126400 100644 --- a/tasks/csscss.js +++ b/tasks/csscss.js @@ -34,7 +34,12 @@ module.exports = function(grunt) { * adds the file path as the final argument, this goes into a new array so * the file doesn't get used in the next iteration. */ - var cmdArgs = args.concat([fileToBeAnalyzed]); + var cmdArgs = args.concat([fileToBeAnalyzed]), + + /** + * Stores the output from CSSCSS. + */ + childOutput = ''; /** * Outputs the file that is being analysed. @@ -56,14 +61,6 @@ module.exports = function(grunt) { return grunt.warn('Ruby and csscss have to be installed and in your PATH for this task to run.'); } - innerNext(error); - }); - - /** - * Displays the output and error streams via the parent process. - */ - child.stdout.on('data', function(buf) { - var childOutput = String(buf); grunt.log.writeln(childOutput); /** @@ -79,6 +76,15 @@ module.exports = function(grunt) { if (!(options.outputJson && JSON.parse(childOutput).length === 0)) { hasDuplicates = true; } + + innerNext(error); + }); + + /** + * Displays the output and error streams via the parent process. + */ + child.stdout.on('data', function(buf) { + childOutput += String(buf); }); child.stderr.on('data', function(buf) { From 708372cdf855cbb52337c7fad74132ba8b034af2 Mon Sep 17 00:00:00 2001 From: Peter Keating Date: Thu, 20 Feb 2014 23:38:03 +0000 Subject: [PATCH 3/6] updated example of outputting analysis to a file. --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f24c2ed..587109a 100644 --- a/README.md +++ b/README.md @@ -205,11 +205,13 @@ Example of using the Grunt task to output the analysis from CSSCSS to a local fi ```js csscss: { - options: { - outputJson: true - }, dist: { - 'output.json': ['css/style.css'] + options: { + outputJson: true + }, + files: { + 'output.json': ['css/style.css'] + } } } ``` From 8c7548c3f1fac520f533f44d577e15a7210fc2a7 Mon Sep 17 00:00:00 2001 From: Peter Keating Date: Thu, 20 Feb 2014 23:38:33 +0000 Subject: [PATCH 4/6] updated package to 0.6.2. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a1ed09..cba9f46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grunt-csscss", - "version": "0.6.1", + "version": "0.6.2", "description": "Grunt task that executes CSSCSS.", "homepage": "https://github.com/peterkeating/grunt-csscss", "author": { From 8ce48590a52b4d819df3d6144de592bee7835a93 Mon Sep 17 00:00:00 2001 From: Peter Keating Date: Thu, 20 Feb 2014 23:40:30 +0000 Subject: [PATCH 5/6] updated the change log with updates. --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f39844..f267faf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### 0.6.2 (Not yet released) + +* Updated grunt dependency to 0.4.2. +* Fixed example in README of outputting analysis to a file. +* Fixed issue causing task to crash when processing files with extreme amounts of duplication. + ### 0.6.1 (September 13th 2013) * Fixed typo in documentation example courtesy of [joshmatz](https://github.com/joshmatz). ([#9](https://github.com/peterkeating/grunt-csscss/pull/9)) From 9801b86fec7dcc8656d364bf74872b115f2bfa8f Mon Sep 17 00:00:00 2001 From: Peter Keating Date: Mon, 28 Apr 2014 22:13:04 +0100 Subject: [PATCH 6/6] released v0.6.2. --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f267faf..a5a7b55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -### 0.6.2 (Not yet released) +### 0.6.2 (28th April 2014) * Updated grunt dependency to 0.4.2. * Fixed example in README of outputting analysis to a file. -* Fixed issue causing task to crash when processing files with extreme amounts of duplication. +* Fixed issue causing task to crash when processing files with large amounts of duplication. ### 0.6.1 (September 13th 2013)