File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 2929 "test" : " grunt test"
3030 },
3131 "dependencies" : {
32- "csscomb" : " 1 .0.0 "
32+ "csscomb" : " 2 .0.x "
3333 },
3434 "devDependencies" : {
3535 "grunt-contrib-jshint" : " ~0.6.0" ,
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ module.exports = function (grunt) {
1111 grunt . registerMultiTask ( 'csscomb' , 'Sorting CSS properties in specific order.' , function ( ) {
1212
1313 var Comb = require ( 'csscomb' ) ,
14- defaultConfig = require ( '../node_modules/csscomb/.csscomb.json' ) ;
14+ comb = new Comb ( ) ,
15+ defaultConfig = comb . getConfig ( 'csscomb' ) ;
1516
1617 // Get config file from task's options:
1718 var config = grunt . task . current . options ( ) . sortOrder ;
@@ -24,11 +25,10 @@ module.exports = function (grunt) {
2425 config = defaultConfig ;
2526 }
2627
27- this . files . forEach ( function ( f ) {
28+ // Configure csscomb:
29+ comb . configure ( config ) ;
2830
29- // Create a new instance of csscomb and configure it:
30- var comb = new Comb ( ) ;
31- comb . configure ( config ) ;
31+ this . files . forEach ( function ( f ) {
3232
3333 f . src . filter ( function ( filepath ) {
3434 // Warn on and remove invalid source files (if nonull was set).
@@ -50,4 +50,4 @@ module.exports = function (grunt) {
5050 } ) ;
5151 } ) ;
5252 } ) ;
53- } ;
53+ } ;
You can’t perform that action at this time.
0 commit comments