I am new to Compass and SASS around the world, so there may be something fundamental to me. I am facing a structuring problem with Foundation 5.
How to make it all work neatly within an existing project (git)? When I run foundation new myproject
, it clones the basics in "myproject": bower_components / folder for dependencies, config.rb in the root folder "scss", where I can modify the SASS files using the ones compass watch
running in the background to generate my CSS files and an example index file. html At its core, I think I understand how it all works.
I have an existing project in which I intend to use Foundation 5. My first instinct was to try to โinitializeโ the Foundation at the root of my project: foundation new .
Since it uses git, of course, it complained that the directory was not empty. Fair enough, so I did it in my subfolder of the public_html: foundation new foundation
. I put config.rb at the root of my project and updated the paths, so I can just run compass watch
from my root. It all worked pretty neatly, I played with scss files and watched my css file update accordingly. Then I completed the result and pulled it out of another place. the โfoundationโ, which is a repo within a repo, was not completed along with everything else. Most of the material inside doesn't matter -foundation new whatever
loads it all again, and .gitignoring / bower_components is reasonable. But the user code inside the scss directory I really need. I tried to set up my project differently by having the "scss" dir outside the bower directory and setting it as sass_dir in config.rb. This setup makes sense to me, but I can't get it to work: the launch compass watch
fails with an error:
File to import not found or unreadable: foundation.
My config.rb right now:
http_path = "/"
css_dir = "public_html/assets/css"
sass_dir = "foundation/scss"
images_dir = "public_html/assets/img"
javascripts_dir = "public_html/assets/js"
How can I directly say where the foundation is? I tried playing with add_import_path in config.rb, but it did little.
I have a feeling that I'm missing something fundamental here, or maybe I'm overdoing it. Google doesn't help much, since Foundation 5 is pretty much fresh from the oven. Can someone give me a push in the right direction?
Thanks!