From 44c0e7d42512a9865f38e2241980847c9038f1f6 Mon Sep 17 00:00:00 2001 From: Tony Ganch Date: Mon, 9 Jun 2014 18:27:47 +0400 Subject: [PATCH 01/30] Update CSScomb to v3.0.0 --- package.json | 4 ++-- tasks/csscomb.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 293e2d7..acab93c 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "test": "grunt test" }, "dependencies": { - "csscomb": "~2.0.0" + "csscomb": "~3.0.0" }, "devDependencies": { "grunt-contrib-jshint": "~0.6.0", @@ -61,4 +61,4 @@ "SCSS", "LESS" ] -} \ No newline at end of file +} diff --git a/tasks/csscomb.js b/tasks/csscomb.js index 32d0064..e12fd1c 100644 --- a/tasks/csscomb.js +++ b/tasks/csscomb.js @@ -54,7 +54,7 @@ module.exports = function (grunt) { config = grunt.file.readJSON(config); } else { grunt.log.ok('Using default config file...'); - config = comb.getConfig('csscomb'); + config = Comb.getConfig('csscomb'); } // Configure csscomb: From ba0e217fbb2d7552ef748500e5e1234b1f65263f Mon Sep 17 00:00:00 2001 From: Tony Ganch Date: Mon, 9 Jun 2014 18:46:16 +0400 Subject: [PATCH 02/30] v3.0.0-1 Published for testing purpose --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index acab93c..a9f0dcc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-csscomb", "description": "The grunt plugin for sorting CSS properties in specific order.", - "version": "2.0.1", + "version": "3.0.0-1", "homepage": "https://github.com/csscomb/grunt-csscomb", "author": [ { From 4043c2961d9504474ead5da23560fae06a9aefaa Mon Sep 17 00:00:00 2001 From: t32k Date: Thu, 12 Jun 2014 10:33:24 +0800 Subject: [PATCH 03/30] Update devDpendency --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a9f0dcc..2ed1599 100644 --- a/package.json +++ b/package.json @@ -46,13 +46,13 @@ "csscomb": "~3.0.0" }, "devDependencies": { - "grunt-contrib-jshint": "~0.6.0", - "grunt-contrib-clean": "~0.4.0", - "grunt-contrib-nodeunit": "~0.2.0", - "grunt": "~0.4.2" + "grunt": "^0.4.5", + "grunt-contrib-clean": "^0.4.0", + "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-nodeunit": "^0.4.0" }, "peerDependencies": { - "grunt": "~0.4.2" + "grunt": "^0.4.5" }, "keywords": [ "gruntplugin", From efca0481fdb9f5ad35436dd2a76763fd3a68da2a Mon Sep 17 00:00:00 2001 From: Tony Ganch Date: Sat, 19 Jul 2014 11:14:47 +0400 Subject: [PATCH 04/30] Fix `processString` call --- tasks/csscomb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/csscomb.js b/tasks/csscomb.js index e12fd1c..0af990d 100644 --- a/tasks/csscomb.js +++ b/tasks/csscomb.js @@ -78,7 +78,7 @@ module.exports = function (grunt) { // Comb it: grunt.log.ok('Sorting file "' + src + '"...'); var syntax = src.split('.').pop(); - var combed = comb.processString(css, syntax); + var combed = comb.processString(css, { syntax: syntax }); grunt.file.write(f.dest, combed); }); }); From 74e5dff9e5761f18844b6c9e1fc560e2ee056709 Mon Sep 17 00:00:00 2001 From: t32k Date: Sat, 19 Jul 2014 21:11:14 +0800 Subject: [PATCH 05/30] Release v3.0.0 --- README.md | 4 ++-- package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d50979a..15281ec 100644 --- a/README.md +++ b/README.md @@ -103,11 +103,11 @@ grunt.initConfig({ ## Release History - ++ v3.0.0: Update csscomb.js to v3.0 but `grunt-csscomb` API doesn't change. + v2.0.1: Stop searching config if we reach root directory. + v2.0.0: Bump up. + v1.2.1: Bump up. -+ v1.2.0: Update csscomb.js to version 2.0 and change `sortOrder` to `config`. ++ v1.2.0: Update csscomb.js to v2.0 and change API `sortOrder` to `config`. + v1.1.0: Improve process. + v1.0.0: Support [csscomb.js](http://github.com/csscomb/csscomb.js). + v0.5.0: Enable multiple files. diff --git a/package.json b/package.json index 2ed1599..58f290e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-csscomb", "description": "The grunt plugin for sorting CSS properties in specific order.", - "version": "3.0.0-1", + "version": "3.0.0", "homepage": "https://github.com/csscomb/grunt-csscomb", "author": [ { @@ -47,9 +47,9 @@ }, "devDependencies": { "grunt": "^0.4.5", - "grunt-contrib-clean": "^0.4.0", + "grunt-contrib-clean": "^0.5.0", "grunt-contrib-jshint": "^0.10.0", - "grunt-contrib-nodeunit": "^0.4.0" + "grunt-contrib-nodeunit": "^0.4.1" }, "peerDependencies": { "grunt": "^0.4.5" From 9d242376a2f46a133b3f04cf16c9b7e31965a968 Mon Sep 17 00:00:00 2001 From: t32k Date: Sat, 19 Jul 2014 21:15:26 +0800 Subject: [PATCH 06/30] Remove extra comma --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 15281ec..587017e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ grunt.initConfig({ }, your_target: { // Target-specific file lists and/or options go here. - }, + } } }); ``` @@ -52,13 +52,13 @@ grunt.initConfig({ foo: { files: { 'dest/resorted-foo.css': ['src/foo.css'], - }, + } }, bar: { files: { 'dest/resorted-foo.css': ['src/foo.css'], - 'dest/resorted-bar.css': ['src/bar.css'], - }, + 'dest/resorted-bar.css': ['src/bar.css'] + } } } }); @@ -76,7 +76,7 @@ grunt.initConfig({ config: '/path/to/config.json' }, files: { - 'dest/resorted-foo.css': ['src/foo.css'], + 'dest/resorted-foo.css': ['src/foo.css'] } } } From baddde92bd7206aaec400dc5d607aa824614de37 Mon Sep 17 00:00:00 2001 From: Jannick Garthen Date: Tue, 23 Sep 2014 10:31:12 +0200 Subject: [PATCH 07/30] Show error when csscomb task throws --- tasks/csscomb.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tasks/csscomb.js b/tasks/csscomb.js index 0af990d..305f3f3 100644 --- a/tasks/csscomb.js +++ b/tasks/csscomb.js @@ -74,12 +74,17 @@ module.exports = function (grunt) { // Get CSS from a source file: var css = grunt.file.read(src); + var combed; // Comb it: grunt.log.ok('Sorting file "' + src + '"...'); var syntax = src.split('.').pop(); - var combed = comb.processString(css, { syntax: syntax }); - grunt.file.write(f.dest, combed); + try { + combed = comb.processString(css, { syntax: syntax }); + grunt.file.write(f.dest, combed); + } catch(e) { + grunt.log.error(e); + } }); }); }); From 173d6c5e3a420ba43230e5653e5d17b5c8945d0c Mon Sep 17 00:00:00 2001 From: Tony Ganch Date: Thu, 21 May 2015 16:20:41 +0200 Subject: [PATCH 08/30] Update CSScomb to v3.1.x --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 58f290e..5ccb680 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "test": "grunt test" }, "dependencies": { - "csscomb": "~3.0.0" + "csscomb": "~3.1.0" }, "devDependencies": { "grunt": "^0.4.5", From 6f4304b7cf414a9d2c6d194f167042e6e7bcfe45 Mon Sep 17 00:00:00 2001 From: t32k Date: Thu, 21 May 2015 21:26:23 -0700 Subject: [PATCH 09/30] 3.0.1 --- package.json | 122 +++++++++++++++++++++++++-------------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index 5ccb680..5149601 100644 --- a/package.json +++ b/package.json @@ -1,64 +1,64 @@ { - "name": "grunt-csscomb", - "description": "The grunt plugin for sorting CSS properties in specific order.", - "version": "3.0.0", - "homepage": "https://github.com/csscomb/grunt-csscomb", - "author": [ - { - "name": "Koji Ishimoto", - "email": "ijok.ijok@gmail.com", - "url": "http://t32k.me/" - }, - { - "name": "Tony Ganch", - "email": "tonyganch+github@gmail.com", - "web": "http://tonyganch.com/" - } - ], - "contributors": [ - { - "name": "Shogo Sensui", - "email": "shogo.sensui@gmail.com", - "web": "http://1000ch.net/" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/csscomb/grunt-csscomb.git" + "name": "grunt-csscomb", + "description": "The grunt plugin for sorting CSS properties in specific order.", + "version": "3.0.1", + "homepage": "https://github.com/csscomb/grunt-csscomb", + "author": [ + { + "name": "Koji Ishimoto", + "email": "ijok.ijok@gmail.com", + "url": "http://t32k.me/" }, - "bugs": { - "url": "https://github.com/csscomb/grunt-csscomb/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/csscomb/grunt-csscomb/blob/master/LICENSE-MIT" - } - ], - "main": "Gruntfile.js", - "engines": { - "node": ">= 0.10.0" - }, - "scripts": { - "test": "grunt test" - }, - "dependencies": { - "csscomb": "~3.1.0" - }, - "devDependencies": { - "grunt": "^0.4.5", - "grunt-contrib-clean": "^0.5.0", - "grunt-contrib-jshint": "^0.10.0", - "grunt-contrib-nodeunit": "^0.4.1" - }, - "peerDependencies": { - "grunt": "^0.4.5" - }, - "keywords": [ - "gruntplugin", - "CSScomb", - "Sass", - "SCSS", - "LESS" - ] + { + "name": "Tony Ganch", + "email": "tonyganch+github@gmail.com", + "web": "http://tonyganch.com/" + } + ], + "contributors": [ + { + "name": "Shogo Sensui", + "email": "shogo.sensui@gmail.com", + "web": "http://1000ch.net/" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/csscomb/grunt-csscomb.git" + }, + "bugs": { + "url": "https://github.com/csscomb/grunt-csscomb/issues" + }, + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/csscomb/grunt-csscomb/blob/master/LICENSE-MIT" + } + ], + "main": "Gruntfile.js", + "engines": { + "node": ">= 0.10.0" + }, + "scripts": { + "test": "grunt test" + }, + "dependencies": { + "csscomb": "~3.1.0" + }, + "devDependencies": { + "grunt": "^0.4.5", + "grunt-contrib-clean": "^0.5.0", + "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-nodeunit": "^0.4.1" + }, + "peerDependencies": { + "grunt": "^0.4.5" + }, + "keywords": [ + "gruntplugin", + "CSScomb", + "Sass", + "SCSS", + "LESS" + ] } From d4318c930573c68ce6ebddd40fbf0816216ad0c0 Mon Sep 17 00:00:00 2001 From: t32k Date: Thu, 21 May 2015 21:27:49 -0700 Subject: [PATCH 10/30] Update devDependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5149601..1c1a643 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,8 @@ }, "devDependencies": { "grunt": "^0.4.5", - "grunt-contrib-clean": "^0.5.0", - "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-jshint": "^0.11.2", "grunt-contrib-nodeunit": "^0.4.1" }, "peerDependencies": { From 95b0d1d3836d8e433ccf7b62f22ce98d908537c0 Mon Sep 17 00:00:00 2001 From: Tony Ganch Date: Mon, 17 Aug 2015 14:18:28 +0300 Subject: [PATCH 11/30] v3.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c1a643..82031d6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-csscomb", "description": "The grunt plugin for sorting CSS properties in specific order.", - "version": "3.0.1", + "version": "3.1.0", "homepage": "https://github.com/csscomb/grunt-csscomb", "author": [ { From 9a665ebdf270c92fa70724cbaad9b915892604f9 Mon Sep 17 00:00:00 2001 From: gruntjs-updater Date: Sat, 20 Feb 2016 15:48:32 -0500 Subject: [PATCH 12/30] Update peerDependencies to support Grunt 1.0 Hello, This is an automated issue request to update the `peerDependencies` for your Grunt plugin. We ask you to merge this and **publish a new release on npm** to get your plugin working in Grunt 1.0! Read more here: http://gruntjs.com/blog/2016-02-11-grunt-1.0.0-rc1-released#peer-dependencies Also on Twitter: https://twitter.com/gruntjs/status/700819604155707392 If you have any questions or you no longer have time to maintain this plugin, then please let us know in this thread. Thanks for creating and working on this plugin! (P.S. Close this PR if it is a mistake, sorry) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 82031d6..efc48c1 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "grunt-contrib-nodeunit": "^0.4.1" }, "peerDependencies": { - "grunt": "^0.4.5" + "grunt": ">=0.4.0" }, "keywords": [ "gruntplugin", From 9ed994a08e96e7e00e5269bf487a6aaacbbc396b Mon Sep 17 00:00:00 2001 From: Tony Ganch Date: Sun, 10 Jul 2016 13:41:18 +0200 Subject: [PATCH 13/30] v3.1.1 --- README.md | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 587017e..2012d08 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Getting Started -This plugin requires Grunt `0.4.x`. +This plugin requires Grunt `>=0.4.x`. If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: @@ -103,6 +103,7 @@ grunt.initConfig({ ## Release History ++ v3.1.1: Update grunt version. + v3.0.0: Update csscomb.js to v3.0 but `grunt-csscomb` API doesn't change. + v2.0.1: Stop searching config if we reach root directory. + v2.0.0: Bump up. @@ -114,4 +115,4 @@ grunt.initConfig({ + v0.4.0: Move to csscomb's repository. + v0.3.0: Fix sort option bug. + v0.2.0: Fix bugs. -+ v0.1.0: Release. \ No newline at end of file ++ v0.1.0: Release. diff --git a/package.json b/package.json index efc48c1..ea861a8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-csscomb", "description": "The grunt plugin for sorting CSS properties in specific order.", - "version": "3.1.0", + "version": "3.1.1", "homepage": "https://github.com/csscomb/grunt-csscomb", "author": [ { From a8cb4b4e26bf3eed3b442bf51fd009f05c7c9d36 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Wed, 14 Nov 2018 20:32:03 -0500 Subject: [PATCH 14/30] Update csscomb --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea861a8..32b5f93 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "test": "grunt test" }, "dependencies": { - "csscomb": "~3.1.0" + "csscomb": "~4.2.0" }, "devDependencies": { "grunt": "^0.4.5", From b4efc8540147586e9eb889651d1b3e3a03296b88 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Wed, 14 Nov 2018 21:14:09 -0500 Subject: [PATCH 15/30] Update Node, grunt, and grunt-contrib-jshint --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 32b5f93..72f5eaa 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ ], "main": "Gruntfile.js", "engines": { - "node": ">= 0.10.0" + "node": ">= 8.0.0" }, "scripts": { "test": "grunt test" @@ -46,13 +46,13 @@ "csscomb": "~4.2.0" }, "devDependencies": { - "grunt": "^0.4.5", + "grunt": "^1.0.3", "grunt-contrib-clean": "^0.6.0", - "grunt-contrib-jshint": "^0.11.2", + "grunt-contrib-jshint": "^2.0.0", "grunt-contrib-nodeunit": "^0.4.1" }, "peerDependencies": { - "grunt": ">=0.4.0" + "grunt": ">=1.0.0" }, "keywords": [ "gruntplugin", From 4152bc0d8d2ee2e14e3e7038693a91634682b4ba Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Wed, 14 Nov 2018 21:30:12 -0500 Subject: [PATCH 16/30] Update tests --- package.json | 2 +- test/csscomb_test.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 72f5eaa..46ca4cb 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "grunt": "^1.0.3", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-jshint": "^2.0.0", - "grunt-contrib-nodeunit": "^0.4.1" + "grunt-contrib-nodeunit": "^2.0.0" }, "peerDependencies": { "grunt": ">=1.0.0" diff --git a/test/csscomb_test.js b/test/csscomb_test.js index 2ee9207..e0c984f 100644 --- a/test/csscomb_test.js +++ b/test/csscomb_test.js @@ -8,7 +8,7 @@ exports.csscomb = { var actual = grunt.file.read('test/fixtures/tmp_resort.css'); var expected = grunt.file.read('test/expected/resort.css'); - test.equal(actual, expected, 'sholud be sorted.'); + test.equal(actual, expected, 'should be sorted.'); test.done(); }, @@ -17,7 +17,7 @@ exports.csscomb = { var actual = grunt.file.read('test/fixtures/tmp_customsort.css'); var expected = grunt.file.read('test/expected/customsort.css'); - test.equal(actual, expected, 'sholud be custom sorted.'); + test.equal(actual, expected, 'should be custom sorted.'); test.done(); }, @@ -26,11 +26,11 @@ exports.csscomb = { var actual = grunt.file.read('test/fixtures/tmp_multi1.css'); var expected = grunt.file.read('test/expected/multi1.css'); - test.equal(actual, expected, 'sholud be sorted.'); + test.equal(actual, expected, 'should be sorted.'); var actual2 = grunt.file.read('test/fixtures/tmp_multi2.css'); var expected2 = grunt.file.read('test/expected/multi2.css'); - test.equal(actual2, expected2, 'sholud be sorted.'); + test.equal(actual2, expected2, 'should be sorted.'); test.done(); }, @@ -39,11 +39,11 @@ exports.csscomb = { var actual = grunt.file.read('test/fixtures/dest/multi1.resorted.css'); var expected = grunt.file.read('test/expected/multi1.css'); - test.equal(actual, expected, 'sholud be sorted.'); + test.equal(actual, expected, 'should be sorted.'); var actual2 = grunt.file.read('test/fixtures/dest/multi2.resorted.css'); var expected2 = grunt.file.read('test/expected/multi2.css'); - test.equal(actual2, expected2, 'sholud be sorted.'); + test.equal(actual2, expected2, 'should be sorted.'); test.done(); } From 87a9210eda6f454fe64a34f1e184a85181a70dae Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Wed, 14 Nov 2018 21:36:21 -0500 Subject: [PATCH 17/30] Write combed file after Promise is resolved --- tasks/csscomb.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/csscomb.js b/tasks/csscomb.js index 305f3f3..ad897d5 100644 --- a/tasks/csscomb.js +++ b/tasks/csscomb.js @@ -74,14 +74,14 @@ module.exports = function (grunt) { // Get CSS from a source file: var css = grunt.file.read(src); - var combed; // Comb it: grunt.log.ok('Sorting file "' + src + '"...'); var syntax = src.split('.').pop(); try { - combed = comb.processString(css, { syntax: syntax }); - grunt.file.write(f.dest, combed); + comb.processString(css, { syntax: syntax }).then(function(combed) { + grunt.file.write(f.dest, combed); + }); } catch(e) { grunt.log.error(e); } From 2a017869e94b617e0f9b84bbbaa3c826fd50e319 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Wed, 14 Nov 2018 21:41:06 -0500 Subject: [PATCH 18/30] Update grunt-contrib-clean --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46ca4cb..fb8211f 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "devDependencies": { "grunt": "^1.0.3", - "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-clean": "^2.0.0", "grunt-contrib-jshint": "^2.0.0", "grunt-contrib-nodeunit": "^2.0.0" }, From 108f193df507f7b056588e97c0f459b639a654ad Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Wed, 14 Nov 2018 21:44:49 -0500 Subject: [PATCH 19/30] Use Node 8.x --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1c9c17d..2d6cda3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js node_js: - - "0.10" + - "8.0.0" before_script: - npm install grunt-cli \ No newline at end of file From e5093bbddd0486a5c53cafedae24a807a54209f7 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Wed, 28 Nov 2018 05:18:50 -0500 Subject: [PATCH 20/30] Allow Node 6.x --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb8211f..09f352d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ ], "main": "Gruntfile.js", "engines": { - "node": ">= 8.0.0" + "node": ">= 6.0.0" }, "scripts": { "test": "grunt test" From 9b4dca8ce781a7396156b91bbd1de2244c8a5564 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Thu, 6 Dec 2018 07:37:55 -0500 Subject: [PATCH 21/30] Update package.json and README --- README.md | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2012d08..ce29881 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ grunt.initConfig({ ## Release History ++ v4.0.0: Update csscomb.js to v4; update dependencies. + v3.1.1: Update grunt version. + v3.0.0: Update csscomb.js to v3.0 but `grunt-csscomb` API doesn't change. + v2.0.1: Stop searching config if we reach root directory. diff --git a/package.json b/package.json index 09f352d..a4cabeb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-csscomb", "description": "The grunt plugin for sorting CSS properties in specific order.", - "version": "3.1.1", + "version": "4.0.0", "homepage": "https://github.com/csscomb/grunt-csscomb", "author": [ { From fc25cb20fd59380130ae052ec618136864051d92 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Fri, 7 Dec 2018 09:16:40 -0500 Subject: [PATCH 22/30] Allow src only --- Gruntfile.js | 6 +++++- README.md | 17 ++++++++++++++++- tasks/csscomb.js | 8 ++++++-- test/csscomb_test.js | 13 +++++++++++++ test/fixtures/src/multi1.css | 13 +++++++++++++ test/fixtures/src/multi1.resorted.css | 19 +++++++++++++++++++ test/fixtures/src/multi2.css | 13 +++++++++++++ test/fixtures/src/multi2.resorted.css | 17 +++++++++++++++++ 8 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 test/fixtures/src/multi1.css create mode 100644 test/fixtures/src/multi1.resorted.css create mode 100644 test/fixtures/src/multi2.css create mode 100644 test/fixtures/src/multi2.resorted.css diff --git a/Gruntfile.js b/Gruntfile.js index fac8a87..4962be4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -24,7 +24,7 @@ module.exports = function (grunt) { // Before generating any new files, remove any previously-created files. clean: { - tests: ['test/fixtures/tmp_*.css','test/fixtures/dest/*.resorted.css'], + tests: ['test/fixtures/tmp_*.css', 'test/fixtures/dest/*.resorted.css', 'test/fixtures/src/*.resorted.css'], }, // Configuration to be run (and then tested). @@ -54,6 +54,10 @@ module.exports = function (grunt) { src: ['*.css', '!*.resorted.css'], dest: 'test/fixtures/dest/', ext: '.resorted.css' + }, + src_only: { + src: ['test/fixtures/src/*.css', '!test/fixtures/src/*.resorted.css'], + ext: '.resorted.css' } }, diff --git a/README.md b/README.md index ce29881..ed7dff1 100644 --- a/README.md +++ b/README.md @@ -101,9 +101,24 @@ grunt.initConfig({ }); ``` +#### Src Only + +If you provide only a `src` with no value for `dest`, then `dest` will automatically be set to the `src` directory. + +```js +grunt.initConfig({ + csscomb: { + src_only: { + src: ['foo/bar.css'], + ext: '.resorted.css' + } + } +}); +``` + ## Release History -+ v4.0.0: Update csscomb.js to v4; update dependencies. ++ v4.0.0: Update csscomb.js to v4; update dependencies; allow src only. + v3.1.1: Update grunt version. + v3.0.0: Update csscomb.js to v3.0 but `grunt-csscomb` API doesn't change. + v2.0.1: Stop searching config if we reach root directory. diff --git a/tasks/csscomb.js b/tasks/csscomb.js index ad897d5..8f2042a 100644 --- a/tasks/csscomb.js +++ b/tasks/csscomb.js @@ -71,16 +71,20 @@ module.exports = function (grunt) { return true; } }).forEach(function (src) { + var dest = f.dest, + syntax = src.split('.').pop(); + if (!dest) { + dest = grunt.file.expandMapping(src, '', { ext: f.ext || '.' + syntax })[0].dest; + } // Get CSS from a source file: var css = grunt.file.read(src); // Comb it: grunt.log.ok('Sorting file "' + src + '"...'); - var syntax = src.split('.').pop(); try { comb.processString(css, { syntax: syntax }).then(function(combed) { - grunt.file.write(f.dest, combed); + grunt.file.write(dest, combed); }); } catch(e) { grunt.log.error(e); diff --git a/test/csscomb_test.js b/test/csscomb_test.js index e0c984f..aaa323a 100644 --- a/test/csscomb_test.js +++ b/test/csscomb_test.js @@ -45,6 +45,19 @@ exports.csscomb = { var expected2 = grunt.file.read('test/expected/multi2.css'); test.equal(actual2, expected2, 'should be sorted.'); + test.done(); + }, + src_only: function (test) { + test.expect(2); + + var actual = grunt.file.read('test/fixtures/src/multi1.resorted.css'); + var expected = grunt.file.read('test/expected/multi1.css'); + test.equal(actual, expected, 'should be sorted.'); + + var actual2 = grunt.file.read('test/fixtures/src/multi2.resorted.css'); + var expected2 = grunt.file.read('test/expected/multi2.css'); + test.equal(actual2, expected2, 'should be sorted.'); + test.done(); } }; \ No newline at end of file diff --git a/test/fixtures/src/multi1.css b/test/fixtures/src/multi1.css new file mode 100644 index 0000000..c3944af --- /dev/null +++ b/test/fixtures/src/multi1.css @@ -0,0 +1,13 @@ +.multi1 { + z-index: 100; + display: block; + visibility: hidden; + max-height: 44px; + width: 100px; + height: 100px; + border-color: 1px #000 solid; + background-color: red; + vertical-align: 5px; + text-align: center; + font-weight: bold; +} \ No newline at end of file diff --git a/test/fixtures/src/multi1.resorted.css b/test/fixtures/src/multi1.resorted.css new file mode 100644 index 0000000..481901a --- /dev/null +++ b/test/fixtures/src/multi1.resorted.css @@ -0,0 +1,19 @@ +.multi1 +{ + font-weight: bold; + + z-index: 100; + + display: block; + visibility: hidden; + + width: 100px; + height: 100px; + max-height: 44px; + + text-align: center; + vertical-align: 5px; + + border-color: 1px #000 solid; + background-color: red; +} diff --git a/test/fixtures/src/multi2.css b/test/fixtures/src/multi2.css new file mode 100644 index 0000000..2ec4d0b --- /dev/null +++ b/test/fixtures/src/multi2.css @@ -0,0 +1,13 @@ +.multi2 { + position: absolute; + top: 10px; + left: 10px; + z-index: 10; + display: table; + float: left; + margin: 10px; + padding: 10px; + width: 10px; + height: 10px; + border: 1px #fff solid; +} \ No newline at end of file diff --git a/test/fixtures/src/multi2.resorted.css b/test/fixtures/src/multi2.resorted.css new file mode 100644 index 0000000..7af8039 --- /dev/null +++ b/test/fixtures/src/multi2.resorted.css @@ -0,0 +1,17 @@ +.multi2 +{ + position: absolute; + z-index: 10; + top: 10px; + left: 10px; + + display: table; + float: left; + + width: 10px; + height: 10px; + margin: 10px; + padding: 10px; + + border: 1px #fff solid; +} From ccda74073e4816f1e7c3087720ac823187d9abdb Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Thu, 14 Nov 2019 12:45:11 -0500 Subject: [PATCH 23/30] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a4cabeb..34ac53f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-csscomb", "description": "The grunt plugin for sorting CSS properties in specific order.", - "version": "4.0.0", + "version": "4.1.0", "homepage": "https://github.com/csscomb/grunt-csscomb", "author": [ { From 2b5b448e2eda687e2b8f313747da65f19ade6508 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Thu, 14 Nov 2019 12:47:47 -0500 Subject: [PATCH 24/30] Update dependencies --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 34ac53f..d8e27a1 100644 --- a/package.json +++ b/package.json @@ -43,12 +43,12 @@ "test": "grunt test" }, "dependencies": { - "csscomb": "~4.2.0" + "csscomb": "~4.3.0" }, "devDependencies": { - "grunt": "^1.0.3", + "grunt": "^1.0.4", "grunt-contrib-clean": "^2.0.0", - "grunt-contrib-jshint": "^2.0.0", + "grunt-contrib-jshint": "^2.1.0", "grunt-contrib-nodeunit": "^2.0.0" }, "peerDependencies": { From 6865ab59b4b616b190a0e05984f54cf1ce6ba91f Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Thu, 14 Nov 2019 12:53:55 -0500 Subject: [PATCH 25/30] Bump version of Node used by Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2d6cda3..3325c40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js node_js: - - "8.0.0" + - "12.3.0" before_script: - npm install grunt-cli \ No newline at end of file From d339002949431475aa28ffe1dc413dbbba893820 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Mon, 5 Oct 2020 20:36:52 -0400 Subject: [PATCH 26/30] Require Node 10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d8e27a1..4a22867 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ ], "main": "Gruntfile.js", "engines": { - "node": ">= 6.0.0" + "node": ">= 10.0.0" }, "scripts": { "test": "grunt test" From 90db067c1eb4fc8b5381c36d64158a1a8386dc66 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Mon, 5 Oct 2020 20:39:28 -0400 Subject: [PATCH 27/30] Update dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4a22867..8225ff4 100644 --- a/package.json +++ b/package.json @@ -46,10 +46,10 @@ "csscomb": "~4.3.0" }, "devDependencies": { - "grunt": "^1.0.4", + "grunt": "^1.3.0", "grunt-contrib-clean": "^2.0.0", "grunt-contrib-jshint": "^2.1.0", - "grunt-contrib-nodeunit": "^2.0.0" + "grunt-contrib-nodeunit": "^2.1.0" }, "peerDependencies": { "grunt": ">=1.0.0" From eab0393dce9aa60bf3a4c25ba23c9dc03d42ad25 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Mon, 5 Oct 2020 20:39:43 -0400 Subject: [PATCH 28/30] Use Node 14 for tests --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3325c40..0aa55fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js node_js: - - "12.3.0" + - "14.13.0" before_script: - npm install grunt-cli \ No newline at end of file From 1c46311544cfe29a6c020ec5932c396f69c10cd7 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Mon, 5 Oct 2020 20:42:01 -0400 Subject: [PATCH 29/30] Update README --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ed7dff1..a9d7db2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Getting Started -This plugin requires Grunt `>=0.4.x`. +This plugin requires Grunt `>=1.0.x`. If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: @@ -118,6 +118,8 @@ grunt.initConfig({ ## Release History ++ v4.2.0: Update dependencies. ++ v4.1.0: Update csscomb.js to v4.3.0; update dependencies. + v4.0.0: Update csscomb.js to v4; update dependencies; allow src only. + v3.1.1: Update grunt version. + v3.0.0: Update csscomb.js to v3.0 but `grunt-csscomb` API doesn't change. From 6e0042c4ccea557900f507e49113ab82fe5201f9 Mon Sep 17 00:00:00 2001 From: Noah Cooper Date: Mon, 5 Oct 2020 20:44:56 -0400 Subject: [PATCH 30/30] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8225ff4..00db708 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-csscomb", "description": "The grunt plugin for sorting CSS properties in specific order.", - "version": "4.1.0", + "version": "4.2.0", "homepage": "https://github.com/csscomb/grunt-csscomb", "author": [ {