Comments (4)
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.
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.
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.
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)
- Suport for sass/scss HOT 2
- Maximum call stack size exceeded in 1.2.0 HOT 5
- Not sure how to make CSSComb plugin sort without unminifying the CSS HOT 4
- Dynamic mapping - overwriting same file HOT 3
- task not sorting, what I'm doing wrong? HOT 3
- Ignoring indentations HOT 1
- Publish new version to npm HOT 5
- 3.0.0-1 issue HOT 2
- @include parse error in SASS (SCSS) HOT 2
- loop tasks
- Lint option is not available HOT 2
- Multiple sources do not work as expected
- console.warn stops CSScomb HOT 1
- In SASS, I can't @extend from a class with a number in it
- Cannot read property of undefined error for SASS files HOT 1
- Large files not running task
- Lift up property "border-color" above "border-bottom" (for example). HOT 3
- Cannot support the latest grunt version v1.0.0 HOT 1
- Security warning in [email protected] - Update csscomb package HOT 1
- Version 4.0.0 is not available using npm HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-csscomb.