How to add import path with command line ?

791 views
Skip to first unread message

MoOx

unread,
Mar 18, 2011, 6:15:09 AM3/18/11
to Compass
Hi,

I'm working on a php project (https://github.com/kriswallsmith/
assetic) and I'm working on a Compass "filter".
So I've a php class wich call a command line compass. And I don't want
to use a config.rb file. But I want to use the add_import_paths
options like in the file.
How to do that ?
I've read this thread
http://groups.google.com/group/compass-users/browse_thread/thread/072bd8b51bec5f7c/77b4ed218b6926d3?#77b4ed218b6926d3
but I don't found an easy way.
Is there today on option like "compass compile ... -add-import-path /
my/path".
I've tried --load but I don't think it' the good option for what I
want.

The problem is my original sass/scss file is not at the original
location, because we use many others filters than compass. So @import
doesn't work :(

Any solution

Chris Eppstein

unread,
Mar 18, 2011, 11:14:34 AM3/18/11
to compas...@googlegroups.com
In the latest Sass alpha releases you can pass the --compass option and use the sass command for your compilation which allows you to specify load paths as an option.

Hunt & pecked on my iPhone... Sorry if it's brief!

> --
> You received this message because you are subscribed to the Google Groups "Compass" group.
> To post to this group, send email to compas...@googlegroups.com.
> To unsubscribe from this group, send email to compass-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/compass-users?hl=en.
>

MoOx

unread,
Mar 18, 2011, 11:31:00 AM3/18/11
to Compass
In the previous thread I mention, I found this command line:

sass -r compass `compass imports` -I my_other_import_directory

The options you are talkin about is something like this ?

On Mar 18, 4:14 pm, Chris Eppstein <ch...@eppsteins.net> wrote:
> In the latest Sass alpha releases you can pass the --compass option and use the sass command for your compilation which allows you to specify load paths as an option.
>
> Hunt & pecked on my iPhone... Sorry if it's brief!
>
> On Mar 18, 2011, at 3:15 AM, MoOx <maxime.thiro...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I'm working on a php project (https://github.com/kriswallsmith/
> > assetic) and I'm working on a Compass "filter".
> > So I've a php class wich call a command line compass. And I don't want
> > to use a config.rb file. But I want to use the add_import_paths
> > options like in the file.
> > How to do that ?
> > I've read this thread
> >http://groups.google.com/group/compass-users/browse_thread/thread/072...

Chris Eppstein

unread,
Mar 18, 2011, 12:01:43 PM3/18/11
to compas...@googlegroups.com
Yes, except --compass is less typing and will optionally handle a compass config file if one is found relative to the current working directory.

Hunt & pecked on my iPhone... Sorry if it's brief!

MoOx

unread,
May 5, 2011, 4:14:04 AM5/5/11
to Compass
With the method using sass --compass, I've some problems (http://
groups.google.com/group/compass-users/browse_thread/thread/
8c2ba408602cc26a/8ade0ca9f4caf916)
Which is that I can use all compass functionalities like sprite
(because I can specify images_dir option - right ?)
Do you think we can modify compass command line options to add a sort
of --load-path, to be able to compile a sass/scss compass file with
the base directory in an other path than the file ?

On Mar 18, 6:01 pm, Chris Eppstein <ch...@eppsteins.net> wrote:
> Yes, except --compass is less typing and will optionally handle a compass config file if one is found relative to the current working directory.
>
> Hunt & pecked on my iPhone... Sorry if it's brief!
>

Chris Eppstein

unread,
May 5, 2011, 1:42:24 PM5/5/11
to compas...@googlegroups.com
Seems like we should support a SASS_PATH environment variable in Sass/Compass. Sass currently supports the -I option but compass does not.

Can you file a compass issue?

chris

Leonardo Picado

unread,
Jul 18, 2012, 1:39:48 PM7/18/12
to compas...@googlegroups.com
Paul

Go over to  https://github.com/chriseppstein/compass/issues  and file the ticket there

On Sun, Jul 15, 2012 at 8:33 PM, Paul Young <paulyou...@gmail.com> wrote:
Hi guys

Wondering what the current method of doing this is?

Thanks

Paul
chris

> >>> To unsubscribe from this group, send email to compass-users+unsubscribe@googlegroups.com.

> >>> For more options, visit this group athttp://groups.google.com/group/compass-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups "Compass" group.
> > To post to this group, send email to compas...@googlegroups.com.
> > To unsubscribe from this group, send email to compass-users+unsubscribe@googlegroups.com.

> > For more options, visit this group athttp://groups.google.com/group/compass-users?hl=en.


--
You received this message because you are subscribed to the Google Groups "Compass" group.
To post to this group, send email to compas...@googlegroups.com.
To unsubscribe from this group, send email to compass-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/compass-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Compass" group.
To view this discussion on the web visit https://groups.google.com/d/msg/compass-users/-/9mXhKNR3su0J.

To post to this group, send email to compas...@googlegroups.com.
To unsubscribe from this group, send email to compass-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/compass-users?hl=en.



--
Leonardo Picado: Advertiser | Programmer | UI Developer
www.leonardopicado.com  |  m...@leonardopicado.com

Reply all
Reply to author
Forward
0 new messages