Specifying multiple directories in sass --load-path from command line

2,353 views
Skip to first unread message

nogridbag

unread,
Nov 29, 2010, 3:02:42 PM11/29/10
to Haml
I'm trying to compile partials from multiple directories into a single
CSS file. In the current directory I have the following directory
structure:

a
_one.scss
_two.scss
b
_three.scss
c
main.scss
css


main.scss which imports all of the partial sccs files:
@import "one";
@import "two";

..and adds additional styles.

From the command line, I want to run sass on main.scss and output to
css/main.css. However, I have to specify directories a and b on the
load path.

With one partials directory it's easy. For example, this works
perfectly fine:
sass --load-path a c/main.scss css/main.css

With two or more directories on the load path, it's not working. I
tried various delimiters and using absolute paths. I also tried using
quotes, putting the file list in [] etc.
sass --load-path a;b c/main.scss css/main.css

I'm not using Rack/Rails/Merb. This is being executed from ant for a
GWT application. If it matters I'm using Windows, but our production
boxes are linux so I need to ensure it works on both.

Thanks!

nogridbag

unread,
Nov 29, 2010, 4:02:39 PM11/29/10
to Haml
I think I found the solution. It seems like you can specify multiple
--load-path's in the command line. Thus:

sass --load-path a --load-path b c/main.scss css/main.css

...seems to work.

Thanks
Reply all
Reply to author
Forward
0 new messages