The problem
Foundation 5 was released last week, that's great, but the new version requires to use bower for using F5 with SASS and the official documentation seems to be a bit incomplete and immature.
I'm trying to create a project using the steps proposed by the docs:
[sudo] npm install -g bower
and then
gem install foundation
No problems here. The problem is when creating a Compass project:
foundation new MY_PROJECT
cd MY_PROJECT
compass compile
After Compass compilation, I get the following error:
directory stylesheets/
error scss/app.scss (Line 1: File to import not found or unreadable: settings.
Load paths:
/home/cartucho/MY_PROJECT/scss
/var/lib/gems/1.9.1/gems/compass-0.12.2/frameworks/blueprint/stylesheets
/var/lib/gems/1.9.1/gems/compass-0.12.2/frameworks/compass/stylesheets
/home/cartucho/MY_PROJECT/bower_components/foundation/scss
Compass::SpriteImporter)
create stylesheets/app.css
Compass config file (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"
The SASS file (app.sass
):
@import "settings";
@import "foundation";
...
The problem seems to be in config.rb
:
add_import_path "bower_components/foundation/scss"
because Compass fail trying to import the files settings
and foundation
but I don't know how to fix it. Any help will be highly appreciated.
Thanks.
Setting up Foundation 5 Sass is quick and easy! We recommend using the Command Line Interface. We've perfected the command line for quick and easy power, but you can use Foundation with just the files or other applications, like Mixture or CodeKit.
You can use it on your Mac to compile your SASS, start building templates, or for directing visual feedback. What's Next? Now that you have Foundation Sass installed, check out the awesome stuff you get and how to use it.
If you're using the CLI to create a project, the Sass compilation process is already set up for you. If not, you can compile our Sass files yourself, or drop in a pre-built CSS file. To get started, first install the framework files using favorite package manager like npm or yarn. Next, add the framework files as an import path.
Note: You can install bower by running the following command: We use bower to keep Foundation assets up to date within your project. Here's how you can update your project: First, you need create a file named bower.json in the root of your Compass project. This should contain the following: Next you will run bower update.
You need to change the line foundation new MY_PROJECT
by replacing MY_PROJECT
with the folder you want to install the project on. After that, confirm that these folders exist on the directory you specified above - "bower_components/foundation/scss"
When starting a project run compass init
and then compass watch
(in Terminal) to watch for changes on the .sass
files.
Personally, I don't go that route and use http://koala-app.com/ to convert or "compile" my Sass. It's FREE and awesome.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With