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

.css files not being generated #8

Closed patocallaghan closed 11 years ago

patocallaghan commented 11 years ago

Hey,

I'm not sure if it's something straightforward I'm not doing correctly but I can't seem to get it to generate .css files from .scss files.

I was originally getting the error from #7 but then followed the instructions for adding the config below and it then went on to generate the out files.

sass:
    sassPath: 'c:/Ruby193/bin/sass.bat'
    scssPath: 'c:/Ruby193/bin/scss.bat'
    compass: true

I have a style.css.scss in files/css which includes lots of .scss files, but when I save it all it does is copy all the .scss files to out. No style.css is created.

I've got a log file here if you want to look and see if anything is out of the ordinary. If you do a search for 21:05 that will be where I saved the style.css.scss file.

I'm on Windows 7, node 0.10.4, docpad 6.34.2, docpad-plugin-sass ~2.4.5.

Thanks, Pat

alehandrof commented 11 years ago

I'm having the same issue.

I discovered that the compilation works just fine if I put (for example) base.css.scss in src/documents/styles but not src/files/styles. This seems a little strange, but is perhaps intentional?

saviomuc commented 11 years ago

It's a feature. Files within "files" don't get rendered, only those in "document" are rendered.http://docpad.org/docs/overview#the-files-directory

Maybe it's possible to clarify that by renaming the folder name of non-rendered files to "static" and "document" to "render" or something like that.

balupton commented 11 years ago

As @saviomuc has stated, only files within documents are rendered by docpad, and require the file.to.from extension format. This is by design. However, if you really must have your sass/scss files inside files, then you could use our events api http://docpad.org/docs/extend to render them with sass itself or grunt or whatnot.

Closing as a wont-fix.

balupton commented 11 years ago

Open to suggestions on how we could avoid this confusion though! Happy to implement ideas.

patocallaghan commented 11 years ago

Ah okay...my bad...the confusion came from the fact that I thought all assets, css, js, images etc where to go into the files directory, whether they were processed or not. Didn't even think that they were to go inside documents. I agree with @saviomuc that the name documents is somewhat misleading and like the idea of static and render. This explicitly tells you what each directory should contain.

Thanks for the response.