Giter Club home page Giter Club logo

Comments (4)

tonyganch avatar tonyganch commented on July 18, 2024

Hi there!
There are two things you need to change.
The first one: replace sortOrder: '/.csscomb.json' with sortOrder: '.csscomb.json'.
There is no slash in the example above you've provided but there is one in your drop_recess_for_less branch :)

The second thing: you need to specify subtask, so your Gruntfile.js looks like this:

...
csscomb: {
    default: {
        options: {
            sortOrder: '.csscomb.json',
        },
        files: {
            'dist/css/<%= pkg.name %>.sorted.css': ['dist/css/<%= pkg.name %>.css'],
            'dist/css/<%= pkg.name %>.min.sorted.css': ['dist/css/<%= pkg.name %>.min.css'],
            'dist/css/<%= pkg.name %>-theme.sorted.css': ['dist/css/<%= pkg.name %>-theme.css'],
            'dist/css/<%= pkg.name %>-theme.min.sorted.css': ['dist/css/<%= pkg.name %>-theme.min.css']
        }
    }
},
...

Those subtasks seem confusing to me now, so I reopened #3.
We'll let you know once it's done if you want.

from grunt-csscomb.

mdo avatar mdo commented on July 18, 2024

Nice, works now, but I may have found another issue.

The snippet of options works (duplicated directly from the aforementioned example), but for some reason the one I was using keeps failing:

Running "csscomb:default" (csscomb) task
>> Using custom config file ".csscomb.json"...
>> Sorting file "dist/css/bootstrap.css"...
>> Sorting file "dist/css/bootstrap.min.css"...
Warning: Function.prototype.apply: Arguments list has wrong type Use --force to continue.

Aborted due to warnings.

I was playing with indentation earlier—2 spaces instead of 4—so perhaps things are a little whacky or sensitive to that? The file in my current PR exhibits this behavior with your fixed code snippet. Unsure since this is my first go at this stuff :).

from grunt-csscomb.

tonyganch avatar tonyganch commented on July 18, 2024

I pulled your branch.
This is what I get:

-> % grunt csscomb
Running "csscomb:sort" (csscomb) task
>> Using custom config file ".csscomb.json"...
>> Sorting file "dist/css/bootstrap.css"...
>> Sorting file "dist/css/bootstrap.min.css"...
>> Sorting file "dist/css/bootstrap-theme.css"...
>> Sorting file "dist/css/bootstrap-theme.min.css"...

Done, without errors.

from grunt-csscomb.

mdo avatar mdo commented on July 18, 2024

Hmm, wonder if there was something else going on. Either way, works now. Thanks for checking! Looking forward to no longer needing the subtask thing, though that's super small. In the mean time, maybe update the readme to include that?

<3

from grunt-csscomb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.