docpad / docpad-plugin-sass

Adds support for the SASS and SCSS CSS pre-processors to DocPad. It also supports the Compass framework.
Other
13 stars 6 forks source link

Compass config file ignored #16

Closed ttamminen closed 11 years ago

ttamminen commented 11 years ago

I am migrating my working Yeoman project to DocPad. The project uses heavily Compass sprite feature. I copied the working config.rb file to the DocPad project root. To me it looks like that config.rb is being ignored.

In the main.css.scss file I have following lines that are giving an error: @import 'icons/*.png'; @include all-icons-sprites;

It's very much like in the Compass documentation (http://compass-style.org/help/tutorials/spriting/)

The error indicates that the paths are not incorrect somehow.

Error: Syntax error: File to import not found or unreadable: icons/*.png. Load paths: c:/Users/ttamminen/Documents/Github/Node-Priima-valmennus c:/Users/ttamminen/Documents/Github/Node-Priima-valmennus/src/documents/styles

It doesn't matter what I have in the Config.rb the error is always same. Any ideas how to debug this?

My folder structure is common DocPad style. Under images folder there are icons & sprites. Icons folder contains separate png files and sprites folder contains single image that has all icons combined.

+---out | +---fonts | | +---eot | | +---otf | | +---ttf | | ---woff | +---images | | +---icons | | ---sprites | +---scripts | | ---vendor | ---styles ---src +---documents | +---fonts | | +---eot | | +---otf | | +---ttf | | ---woff | +---images | | +---icons | | ---sprites | +---scripts | | ---vendor | ---styles | +---compass | | +---css3 | | +---layout | | +---reset | | +---typography | | | +---links | | | +---lists | | | ---text | | ---utilities | | +---color | | +---general | | +---links | | +---lists | | +---sprites | | +---tables | | ---text | ---compass_twitter_bootstrap +---files ---layouts

ttamminen commented 11 years ago

My bad. I made an mistake on the docpad.coffee file. I accidently used mixed indentation and the setting compass: true was ignored. Once I got compass forced to true everything worked smoothly.

simonh1000 commented 10 years ago

What was your final working setup as I cannot get my sprites to compile. I don't have any docpad.coffee issues so I need something else to check

ttamminen commented 10 years ago

You can check the current working config from here: https://github.com/ttamminen/Node-Priima-valmennus

simonh1000 commented 10 years ago

Cheers, I discovered that the issue was that sprites only work with png files!