Skip to content

Commit c2b985f

Browse files
committed
Bump v1.2.1 #4 #14
1 parent cd94b22 commit c2b985f

File tree

10 files changed

+291
-187
lines changed

10 files changed

+291
-187
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: node_js
22
node_js:
3-
- "0.8"
43
- "0.10"
54
before_script:
65
- npm install -g grunt-cli

Gruntfile.js

Lines changed: 63 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,82 @@
11
/*
22
* grunt-csscomb
3-
* https://github.com/t32k/grunt-csscomb
3+
* https://github.com/csscomb/grunt-csscomb
44
*
55
* Copyright (c) 2013 Koji Ishimoto
66
* Licensed under the MIT license.
77
*/
8-
98
'use strict';
109

11-
module.exports = function(grunt) {
10+
module.exports = function (grunt) {
1211

13-
// Project configuration.
14-
grunt.initConfig({
15-
jshint: {
16-
all: [
17-
'Gruntfile.js',
18-
'tasks/*.js',
19-
'<%= nodeunit.tests %>',
20-
],
21-
options: {
22-
jshintrc: '.jshintrc',
23-
},
24-
},
12+
// Project configuration.
13+
grunt.initConfig({
14+
jshint: {
15+
all: [
16+
'Gruntfile.js',
17+
'tasks/*.js',
18+
'<%= nodeunit.tests %>',
19+
],
20+
options: {
21+
jshintrc: '.jshintrc',
22+
},
23+
},
2524

26-
// Before generating any new files, remove any previously-created files.
27-
clean: {
28-
tests: ['test/fixtures/tmp_*.css'],
29-
},
25+
// Before generating any new files, remove any previously-created files.
26+
clean: {
27+
tests: ['test/fixtures/tmp_*.css','test/fixtures/dest/*.resorted.css'],
28+
},
3029

31-
// Configuration to be run (and then tested).
32-
csscomb: {
33-
main: {
34-
files: {
35-
'test/fixtures/tmp_resort.css': ['test/fixtures/style.css'],
36-
}
37-
},
38-
custom: {
39-
options: {
40-
config: 'test/fixtures/sort.json'
30+
// Configuration to be run (and then tested).
31+
csscomb: {
32+
main: {
33+
files: {
34+
'test/fixtures/tmp_resort.css': ['test/fixtures/style.css'],
35+
}
36+
},
37+
custom: {
38+
options: {
39+
config: 'test/fixtures/sort.json'
40+
},
41+
files: {
42+
'test/fixtures/tmp_customsort.css': ['test/fixtures/style.css'],
43+
}
44+
},
45+
multiple: {
46+
files: {
47+
'test/fixtures/tmp_multi1.css': ['test/fixtures/multi1.css'],
48+
'test/fixtures/tmp_multi2.css': ['test/fixtures/multi2.css'],
49+
}
50+
},
51+
dynamic_mappings: {
52+
expand: true,
53+
cwd: 'test/fixtures/dest/',
54+
src: ['*.css', '!*.resorted.css'],
55+
dest: 'test/fixtures/dest/',
56+
ext: '.resorted.css'
57+
}
4158
},
42-
files: {
43-
'test/fixtures/tmp_customsort.css': ['test/fixtures/style.css'],
44-
}
45-
},
46-
multiple: {
47-
files: {
48-
'test/fixtures/tmp_multi1.css': ['test/fixtures/multi1.css'],
49-
'test/fixtures/tmp_multi2.css': ['test/fixtures/multi2.css'],
50-
}
51-
}
52-
},
5359

54-
// Unit tests.
55-
nodeunit: {
56-
tests: ['test/*_test.js'],
57-
},
60+
// Unit tests.
61+
nodeunit: {
62+
tests: ['test/*_test.js'],
63+
},
5864

59-
});
65+
});
6066

61-
// Actually load this plugin's task(s).
62-
grunt.loadTasks('tasks');
67+
// Actually load this plugin's task(s).
68+
grunt.loadTasks('tasks');
6369

64-
// These plugins provide necessary tasks.
65-
grunt.loadNpmTasks('grunt-contrib-jshint');
66-
grunt.loadNpmTasks('grunt-contrib-clean');
67-
grunt.loadNpmTasks('grunt-contrib-nodeunit');
70+
// These plugins provide necessary tasks.
71+
grunt.loadNpmTasks('grunt-contrib-jshint');
72+
grunt.loadNpmTasks('grunt-contrib-clean');
73+
grunt.loadNpmTasks('grunt-contrib-nodeunit');
6874

69-
// Whenever the "test" task is run, first clean the "tmp" dir, then run this
70-
// plugin's task(s), then test the result.
71-
grunt.registerTask('test', ['clean', 'csscomb', 'nodeunit']);
75+
// Whenever the "test" task is run, first clean the "tmp" dir, then run this
76+
// plugin's task(s), then test the result.
77+
grunt.registerTask('test', ['clean', 'csscomb', 'nodeunit']);
7278

73-
// By default, lint and run all tests.
74-
grunt.registerTask('default', ['jshint', 'test']);
79+
// By default, lint and run all tests.
80+
grunt.registerTask('default', ['jshint', 'test']);
7581

76-
};
82+
};

README.md

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ In your project's Gruntfile, add a section named `csscomb` to the data object pa
2525

2626
```js
2727
grunt.initConfig({
28-
csscomb: {
29-
options: {
30-
// Task-specific options go here.
31-
},
32-
your_target: {
33-
// Target-specific file lists and/or options go here.
34-
},
35-
},
36-
})
28+
csscomb: {
29+
options: {
30+
// Task-specific options go here.
31+
},
32+
your_target: {
33+
// Target-specific file lists and/or options go here.
34+
},
35+
}
36+
});
3737
```
3838

3939
### Options
@@ -44,23 +44,24 @@ Default value: `null`
4444

4545
A string value that is used to specify custom-csscomb.json file path.
4646

47-
4847
### Usage Examples
4948

5049
```js
5150
grunt.initConfig({
52-
foo : {
53-
files: {
54-
'dest/resorted-foo.css': ['src/foo.css'],
55-
},
56-
},
57-
bar : {
58-
files: {
59-
'dest/resorted-foo.css': ['src/foo.css'],
60-
'dest/resorted-bar.css': ['src/bar.css'],
61-
},
62-
},
63-
})
51+
csscomb: {
52+
foo: {
53+
files: {
54+
'dest/resorted-foo.css': ['src/foo.css'],
55+
},
56+
},
57+
bar: {
58+
files: {
59+
'dest/resorted-foo.css': ['src/foo.css'],
60+
'dest/resorted-bar.css': ['src/bar.css'],
61+
},
62+
}
63+
}
64+
});
6465
```
6566

6667
#### Custom Options
@@ -69,21 +70,40 @@ You can set the `config` option if you want to use the configuration which you a
6970

7071
```js
7172
grunt.initConfig({
72-
csscomb: {
73-
dist : {
74-
options: {
75-
config: '/path/to/config.json'
76-
},
77-
files: {
78-
'dest/resorted-foo.css': ['src/foo.css'],
79-
}
73+
csscomb: {
74+
dist: {
75+
options: {
76+
config: '/path/to/config.json'
77+
},
78+
files: {
79+
'dest/resorted-foo.css': ['src/foo.css'],
80+
}
81+
}
82+
}
83+
});
84+
```
85+
86+
#### Dynamic Mappings
87+
88+
You can process many individual files of directory with a few additional properties.
89+
90+
```js
91+
grunt.initConfig({
92+
csscomb: {
93+
dynamic_mappings: {
94+
expand: true,
95+
cwd: '/assets/css/',
96+
src: ['*.css', '!*.resorted.css'],
97+
dest: '/assets/dest/css/',
98+
ext: '.resorted.css'
99+
}
80100
}
81-
},
82-
})
101+
});
83102
```
84103

85104
## Release History
86105

106+
+ v1.2.1: Bump v1.2.1
87107
+ v1.2.0: Update csscomb.js to version 2.0 and change `sortOrder` to `config`.
88108
+ v1.1.0: Improve process.
89109
+ v1.0.0: Support [csscomb.js](http://github.com/csscomb/csscomb.js).

package.json

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,51 @@
11
{
22
"name": "grunt-csscomb",
33
"description": "The grunt plugin for sorting CSS properties in specific order.",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"homepage": "https://github.com/csscomb/grunt-csscomb",
66
"author": {
77
"name": "Koji Ishimoto",
88
"email": "ijok.ijok@gmail.com",
99
"url": "http://t32k.me/"
1010
},
11-
"contributors": [
12-
"Tony Ganch"
13-
],
11+
"contributors": [{
12+
"name": "Tony Ganch",
13+
"email": "tonyganch+github@gmail.com",
14+
"web": "http://tonyganch.com/"
15+
}, {
16+
"name": "Shogo Sensui",
17+
"email": "orz1000ch@gmail.com",
18+
"web": "http://1000ch.net/"
19+
}],
1420
"repository": {
1521
"type": "git",
1622
"url": "https://github.com/csscomb/grunt-csscomb.git"
1723
},
1824
"bugs": {
1925
"url": "https://github.com/csscomb/grunt-csscomb/issues"
2026
},
21-
"licenses": [
22-
{
23-
"type": "MIT",
24-
"url": "https://github.com/csscomb/grunt-csscomb/blob/master/LICENSE-MIT"
25-
}
26-
],
27+
"licenses": [{
28+
"type": "MIT",
29+
"url": "https://github.com/csscomb/grunt-csscomb/blob/master/LICENSE-MIT"
30+
}],
2731
"main": "Gruntfile.js",
2832
"engines": {
29-
"node": ">= 0.8.0"
33+
"node": ">= 0.10.0"
3034
},
3135
"scripts": {
3236
"test": "grunt test"
3337
},
3438
"dependencies": {
35-
"csscomb": "2.0.x"
39+
"csscomb": "~2.0.0"
3640
},
3741
"devDependencies": {
3842
"grunt-contrib-jshint": "~0.6.0",
3943
"grunt-contrib-clean": "~0.4.0",
4044
"grunt-contrib-nodeunit": "~0.2.0",
41-
"grunt": "0.4.x"
45+
"grunt": "~0.4.2"
4246
},
4347
"peerDependencies": {
44-
"grunt": "0.4.x"
48+
"grunt": "~0.4.2"
4549
},
4650
"keywords": [
4751
"gruntplugin",

0 commit comments

Comments
 (0)