Compass / compass

Compass is no longer actively maintained. Compass is a Stylesheet Authoring Environment that makes your website design simpler to implement and easier to maintain.
http://compass-style.org
Other
6.72k stars 1.18k forks source link

use external project #587

Closed aurelien-baudet closed 10 years ago

aurelien-baudet commented 13 years ago

Hi,

I have 2 projects:


Here is the folder tree:

MarioRicalde commented 13 years ago

I suggest you look into the Configuration Reference.

What you want to do can be done. You just need to run compass watch in the "first project" and make it include the other files.

You can see I do it Here.

aurelien-baudet commented 13 years ago

I don't understand, you have only ONE compass project with only ONE src folder.

In my case, the project 'im' depends on the project 'xmpp'. Moreover, I want to override some variables (of 'xmpp' project) before importing/using it. So I can't generate xmpp css file and import the generated css because variables won't have the override.

MarioRicalde commented 13 years ago

What I'm saying is that you're thinking it wrong. Split your secondary project into different importable files. And reuse them across both projects...

aurelien-baudet commented 13 years ago

I found the problem: when using sprites accross projects, the sprite utility is looking for images in the folder where the compass watch is launched even if the sprite import is done in the other compass project.

I have made an example: There are 2 projects 'a' and 'b'. 'b' contains images and the sprite information. 'a' imports 'b'. I launch compass watch -c config.rb in 'a' folder.

If there are no sprites at all => it works well. If there are sprite declaration in' b' and images ONLY in 'b' => it fails (see http://www.2shared.com/file/HF4vDuph/failure.html) If there are sprite declaration in 'b' and images moved or duplicated in 'a' => it works (see http://www.2shared.com/file/UsIi6cCU/working.html)

How can I manage this problem ?

scottdavis commented 13 years ago

This is actually a documentation issue (I made a new ticket) for sprites you need to get the sprite_load_path to an array of search paths that may contain sprites ex:

In your compass.rb

sprite_search_path = ['somepath/files', 'myotherpath/files']
aurelien-baudet commented 13 years ago

Thanks for the reply.

I have tried it but doesn't seem to work. I have tried with relative paths and also with absolute paths.

I use compass version 0.11.5. Is a version problem ?

scottdavis commented 13 years ago

Yes importer paths are in the 0.12 beta

Sent from my iPhone

On Oct 6, 2011, at 11:19 AM, aurelien-baudetreply@reply.github.com wrote:

Thanks for the reply.

I have tried it but doesn't seem to work. I have tried with relative paths and also with absolute paths.

I use compass version 0.11.5. Is a version problem ?

Reply to this email directly or view it on GitHub: https://github.com/chriseppstein/compass/issues/587#issuecomment-2311003

aurelien-baudet commented 13 years ago

I have installed the pre version using gem and it has installed the version 0.12.alpha.0. With this version, it doesn't work. How can I install the beta version or when will it be available through gem install ?

scottdavis commented 13 years ago

I know it should work with alpha because I'm using it it production post your configuration please

Sent from my iPad

On Oct 7, 2011, at 3:43 AM, aurelien-baudetreply@reply.github.com wrote:

I have installed the pre version using gem and it has installed the version 0.12.alpha.0. With this version, it doesn't work. How can I install the beta version or when will it be available through gem install ?

Reply to this email directly or view it on GitHub: https://github.com/chriseppstein/compass/issues/587#issuecomment-2318854

aurelien-baudet commented 13 years ago

Thanks for help, I have zipped all files so you can try it by launching OWI/im/compass/watch.bat

http://www.2shared.com/file/X_bUXzfC/owi.html

scottdavis commented 13 years ago

oh your using windows this could possibly be a bug ill check it out

nealstammers commented 11 years ago

Hi Scott, did you ever get to the bottom of this? I'm also on a Windows box trying to use absolute paths for the sprite_load_path array.

The error message includes the absolute directory in the 'Your current load paths are: N:\path' but doesn't seem to see the folder containing the sprites.

Thanks in advance, Neal.

scottdavis commented 11 years ago

Yes try the current master branch

sashasklar commented 11 years ago

Hi Scott, I'm having issues getting this to work as well, and I was wondering if there was a working example posted that we could use as a reference. I can post an example configuration if needed, here's some details about my environment:

Here's my config.rb, I've also tried absolute paths: sass_dir = "sass" add_import_path "../../common/sass" http_path = "/" css_dir = "css" images_dir = "img" http_generated_images_path = "/apps/global-nav/img" sprite_load_path = ["img", "../../common/img"]

scottdavis commented 11 years ago

try upgrading compass to the current master branch sprite_load_path matured between 0.12 and 0.13