Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the output directory of .css files

Tags:

sass

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?

like image 770
rakitin Avatar asked May 25 '12 19:05

rakitin


3 Answers

You can simply use:

sass --watch input-dir:output-dir

i.e:

sass --watch scss:css
like image 190
eneepo Avatar answered Oct 22 '22 22:10

eneepo


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
like image 43
maxbeatty Avatar answered Oct 22 '22 22:10

maxbeatty


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"
like image 3
mattc Avatar answered Oct 22 '22 23:10

mattc