Errors on really basic usage. What am I doing wrong?
corysimmons opened this issue · 3 comments
corysimmons commented
For some reason I can't get this plugin to work at all..
I keep getting this error: Warning: Object #<Object> has no method 'indexOf'
stylus: {
compile: {
files: {
'dist/css/style.css': 'src/assets/css/style.styl'
}
}
}
Any ideas?
jamesplease commented
Can't reproduce. I used the exact same configuration with this as the contents of my .styl
sheet:
body
font: 12px Helvetica, Arial, sans-serif;
a.button
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
Can you give more details?
corysimmons commented
Sorry, it was because my watch
task was looking for <%= stylus.compile.files %>
. I'm not sure why that doesn't work, but when I swapped it for a single file path it worked.
jamesplease commented
@corysimmons, the template functionality only works for strings. When you reference stylus.compile.files
it pulls in the whole object. When you narrow it down to a single file then it pulls in just the string and works :)