Comments (10)
Does it work if you compile your files with Stylus CLI instead of grunt-contrib-stylus?
from grunt-contrib-stylus.
Yes, i can compile without any problems using Stylus CLI.
I am on Windows 7 btw.
from grunt-contrib-stylus.
👍 I have a very similar problem I think.
Always the second file to be compiled doesn't parse nib mixins...
I have two files, both importing nib
. I have setup the Gruntfile
like this now:
stylus:
options:
compress: false
basic:
files: [
"downloads/css/basic.css": "downloads/css/stylus/basic.styl"
]
dropzone:
files: [
"downloads/css/dropzone.css": "downloads/css/stylus/dropzone.styl"
]
dropzone.styl
imports basic.styl
.
If I call grunt stylus:dropzone
or grunt stylus:basic
, it works! Both are compiled properly and the nib mixins are handled.
If I call grunt stylus:dropzone stylus:basic
or grunt stylus:basic stylus:dropzone
the second file never has nib
mixins parsed.
The same happens if I setup the Gruntfile
like this:
stylus:
options:
compress: false
default:
files: [
"downloads/css/basic.css": "downloads/css/stylus/basic.styl"
"downloads/css/dropzone.css": "downloads/css/stylus/dropzone.styl"
]
When I change the order of the files, only the first one works.
from grunt-contrib-stylus.
@enyo Works fine for me: https://gist.github.com/sapegin/1bcd40cea54808f26248
Try to change [] to {} because files isn’t an array.
from grunt-contrib-stylus.
@sapegin Changing it to an object didn't do anything. Try importing s1.styl
in s2.styl
that's where I'm having troubles.
PS: It worked with an array since it's coffee script syntax which resulted in [ { /* files here */ } ]
which apparently works.
from grunt-contrib-stylus.
@enyo Yep, I see the same error @Anifacted posted in the first comment.
from grunt-contrib-stylus.
It's just funny to see that it only happens with imports, and it's always the second file having a problem. So even though my basic.styl
doesn't include anything but nib
, it won't compile properly if it's the second in the list.
from grunt-contrib-stylus.
Actually it’s a Stylus bug and it’s not related to nib. I’ve created an issue: https://github.com/LearnBoost/stylus/issues/1546
from grunt-contrib-stylus.
@sapegin Thanks for looking into it and finding the problem!
from grunt-contrib-stylus.
Yes, thanks for taking the time. Let's hope that this gets fixed in stylus before too long.
from grunt-contrib-stylus.
Related Issues (20)
- Imported CSS not compressed HOT 3
- Output is too verbose by default HOT 1
- CSS duplication after compilation
- please bump a new version that include the latest version of stylus (v0.49.3)
- Stylus failed to compile HOT 1
- Npm package with Stylus 0.50.0 HOT 1
- Warning: undefined is not a function HOT 2
- resolve url doesn't work alone with include css HOT 1
- does not compress normalize.css HOT 2
- Grunt Templates support HOT 2
- Can grunt compile the stylus file separately HOT 1
- Is there any options in Grunt for --disable-cache flag ? HOT 2
- Can we generate several .css files from one .styl file? HOT 1
- How to use grunt stylus to compile each file to the original folder? HOT 1
- Bump to stylus 0.53 is needed! HOT 2
- Support --resolve-url-nocheck HOT 2
- make new release with style 0.54 HOT 2
- Create css files from stylus files
- 1.2.0 Error: Path must be a string. Received undefined under Nodejs 6
- calc giving wrong result
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-contrib-stylus.