[bug] -I imports option not supported

71 views
Skip to first unread message

CK Ng

unread,
Aug 9, 2010, 3:12:59 PM8/9/10
to Compass
Output from "compass imports" where list of "-I <path>" generated are
correct.
But cannot be passed in as command line option, error thrown as
invalid option

# compass compile base.scss -l <path> ...
Error: invalid option: -I

Chris Eppstein

unread,
Aug 9, 2010, 4:06:10 PM8/9/10
to compas...@googlegroups.com
That is for passing to the sass command line. Compass already knows it's own import paths. You can add more import paths by calling add_import_path in your configuration file.


Also, if you're adding things to the import path what you might be wanting to do is create your own personal framework. Here's a tutorial on how to do that:


Chris


--
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.


CK Ng

unread,
Aug 9, 2010, 11:48:19 PM8/9/10
to Compass
Sorry, now only I notice it is for sass command line.

Could I change that to feature request instead? =)

It would be nice to have the command line option built into compass,
because
- not using configuration file
- personal framework might be overkill, and not so suitable in my use
case - trying to import base theme sass to be used in sub-theme
- using PHP, Drupal Compass to be exact (http://drupal.org/project/
compass), trying to add option to the module to search for sass inside
base theme folder


On Aug 10, 4:06 am, Chris Eppstein <ch...@eppsteins.net> wrote:
> That is for passing to the sass command line. Compass already knows it's own
> import paths. You can add more import paths by calling add_import_path in
> your configuration file.
>
> http://compass-style.org/docs/tutorials/configuration-reference/
>
> <http://compass-style.org/docs/tutorials/configuration-reference/>Also, if
> you're adding things to the import path what you might be wanting to do is
> create your own personal framework. Here's a tutorial on how to do that:
>
> http://chriseppstein.github.com/blog/2010/08/01/building-a-personal-f...
>
> <http://chriseppstein.github.com/blog/2010/08/01/building-a-personal-f...>
> Chris
>
> On Mon, Aug 9, 2010 at 12:12 PM, CK Ng <nicec...@gmail.com> wrote:
> > Output from "compass imports" where list of "-I <path>" generated are
> > correct.
> > But cannot be passed in as command line option, error thrown as
> > invalid option
>
> > # compass compile base.scss -l <path> ...
> > Error: invalid option: -I
>
> > --
> > 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<compass-users%2Bunsu...@googlegroups.com>
> > .

Chris Eppstein

unread,
Aug 10, 2010, 12:06:00 AM8/10/10
to compas...@googlegroups.com
It's a strange option for a compass project on the command line.

Why can't you have a configuration file? Perhaps this should be a feature request to the drupal plugin?

Alternatively, you can call the sass command line like so:

sass -r compass `compass imports` -I my_other_import_directory

and that's effectively the compass environment.

Chris


To unsubscribe from this group, send email to compass-user...@googlegroups.com.

CK Ng

unread,
Aug 10, 2010, 1:24:51 AM8/10/10
to Compass
I guess to reduce 'dependency', since mostly are in PHP, having a .rb
will further confuse user, IMHO. So we only have scss as input and css
as output. There is already built-in facility to regenerate the CSS on
demand, on cron, on clearing theme registry (development), or can be
disabled fully on production site.

Furthermore, the 'configuration' can be saved inside theme .info file,
supported command line options like css_dir, sass_dir or images_dir
can be defined inside the .info file, which get automatically convert
to the equivalent command line option --css-dir and so on.

How could that be a strange option? Since there is the already the
configuration additional_import_paths, but without the equivalent
command line option. So it is quite natural to have a command line
option --additional-import-paths, no? =)

What's the equivalent for 'compass compile' in sass command, but that
can't support other framework import (somewhere in your doc), if not
mistaken?

Will also try to see if personal framework could be a solution. Can
personal framework reside in any folder? Will it not have the same
import path problem?


On Aug 10, 12:06 pm, Chris Eppstein <ch...@eppsteins.net> wrote:
> It's a strange option for a compass project on the command line.
>
> Why can't you have a configuration file? Perhaps this should be a feature
> request to the drupal plugin?
>
> Alternatively, you can call the sass command line like so:
>
> sass -r compass `compass imports` -I my_other_import_directory
>
> and that's effectively the compass environment.
>
> Chris
>
> > <compass-users%2Bunsu...@googlegroups.com<compass-users%252Buns...@googlegroups.com>

CK Ng

unread,
Aug 10, 2010, 2:02:58 AM8/10/10
to Compass
What I trying to achieve is actually Project B that depends on Project
A sass.
Since the project folder of A & B can be anywhere, hard-coding the
path is not an option. However through Drupal, we can obtain the path
info and each project's compass 'configuration'. Hence I'm thinking
that the best way is to add project A path to be included to the sass
load path making importing hassle free.

I would say personal framework is more sharable/generic, Project A is
quite specific, maybe only used by Project B, C, but not X, Y.

CK Ng

unread,
Aug 10, 2010, 5:43:22 AM8/10/10
to Compass
I've somewhat success after playing around the personal framework
setup.
Changes I've made to get it to work:
- Project A "scss" folder renamed to "stylesheets"
- Pass "--load <absolute path to project A>" to compass compile
- Then able to 'import "base"', project A _base.scss

Per the framework/extension specification, the following hold:
- sass dir must be "stylesheets"
- --sass-dir and --load options are mutually exclusive

Other observation:
- Project B cannot import using relative path or absolute path from
Project A
Reply all
Reply to author
Forward
0 new messages