benschwarz / bonsai

A tiny static web site generator
http://tinytree.info/
MIT License
297 stars 39 forks source link

Can't get Bonsai to compile scss files #36

Open mrzool opened 9 years ago

mrzool commented 9 years ago

Hi there,

I have created a scss folder in the public folder, but when I run bonsai --repot the scss folder gets copied in output as it is and doesn't compile.

I'm getting this when I run bonsai --repot:

Copying page assets
CSS Syntax error

Undefined variable: "$space".
Copying public files
Compressing javascript and stylesheets
Writing index
Writing pages
     Writing page - /index/
     Writing page - /contatto/
     Writing page - /lavori/
     Writing page - /tecniche/maple/
     Writing page - /tecniche/fig/
     Writing page - /tecniche/
     Writing page - /tecniche/magic/
Writing sitemap
Writing ABOUT-THIS-SITE

Maybe the CSS Syntax error has something to do with this?

I'm pretty sure that the Sass is ok, I got it from here

Thanks for any help.

mrzool commented 9 years ago

Same error trying to compile Bootstrap Sass port:

CSS Syntax error

Undefined variable: "$alert-padding".
Copying public files
Copying page assets
CSS Syntax error

Did nothing but drop the scss files in the public folder. Can't find anything in the documentation.

benschwarz commented 9 years ago

Have you checked that it'll compile on the command line using the sass command?

mrzool commented 9 years ago

I did! The sass compiles just fine.

On Sat, Aug 30, 2014 at 3:15 AM, Ben Schwarz notifications@github.com wrote:

Have you checked that it'll compile on the command line using the sass command?

— Reply to this email directly or view it on GitHub https://github.com/benschwarz/bonsai/issues/36#issuecomment-53944711.

benschwarz commented 9 years ago

At a guess, you should place your bootstrap sass elsewhere in the app/site root, and @import the bootstrap file that you need… This is because I'm more than sure that bonsai is trying to build any sass file in the public directory, and is doing so in order, so for example alert.scss is being @Imported by bonsai, and @variables has not yet been @imported

Basically, if you import the parts of bootstrap that you need, and the required files to build it, then everything should work just fine.


If you can zip-up your bonsai app, and upload it somewhere, I'd be happy to have a splunk around. I haven't actually used bonsai in years, and only do so to answer bug reports … so getting access to your example would be useful.