Creating a 5th project project using SASS

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 watchrunning 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 watchfrom 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 whateverloads 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 watchfails 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!

+4
2

, - Foundation

,

bower install

config.rb, :

# Require any additional compass plugins here.
add_import_path "bower_components/foundation/scss"

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "scss"
images_dir = "images"
javascripts_dir = "javascripts"

, , , , - .

,

+4

. , config.rb. Compass, Foundation. D'.

:

config.rb
public_html/
--assets/
----scss/
----css/
----foundation/
------bower_components/
--------foundation/ 
----------scss/ # this is the dir that needed to be imported from config.rb

Config.rb:

add_import_path "public_html/assets/foundation/bower_components/foundation/scss" # *magic*
http_path = "/"
css_dir = "public_html/assets/css"
sass_dir = "public_html/assets/scss"
images_dir = "public_html/assets/img"
javascripts_dir = "public_html/assets/foundation/js"

, , : Foundation public_html/assets/foundation - , bower update , - scss public_html/assets/scss.

, !

+2

All Articles