21

New to ruby (I usually use python/django), new to sass. I'm simply trying to configure the output css directory option.

Related question here: changing the output directory of the resulting css file in compass webby and here: possible to change the sass compass output folder for different files

Answer to both is to change config.rb. Where is config.rb found? Is there another way to set the options?

4 Answers 4

38

You can simply use:

sass --watch input-dir:output-dir

i.e:

sass --watch scss:css
Sign up to request clarification or add additional context in comments.

2 Comments

scss or sass CLI application's help page doesn't say anything about the colon between input dir and output dir. And this works well for my sass v3.4.22
This is exactly what I needed.
16

config.rb is specific to Compass projects and is located in the root of your project. If you are using Compass, you can specify css_dir to your liking keeping in mind that / is root of your Compass project.

css_dir = "/assets/css"

If you are using just Sass, you can specify the output path when compiling.

sass input.scss ../path/to/output.css

4 Comments

uhm I'm having the same problem, but not sure how to use your answer, I have a scss folder and a css folder, but for some strange reason sass is outputting into a stylesheets folder :(
It's hard to help without knowing more about your project. How are you compiling your sass?
Is there any way, to do this without Compass?
@ts_pati the second code snippet is for the Sass command line tool that takes your input file as the first argument and a path to the output file as the second argument
3

Open config.rb in a text editor and change "css_dir" from "stylesheets" to "/" (see below)

   http_path = "/"
   css_dir = "/"
   sass_dir = "sass"
   images_dir = "images"
   javascripts_dir = "javascripts"

Comments

0

You can also use koala app(http://koala-app.com/) to change the css output direcctory. i think this is simplest method. 1. Install Koala app 2. Run and add both directories in Koala interface and refersh.

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.