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

Referencing a path for "compass compile" as argument does not behave like parameter-less "compass compile" #1319

Open sebnilsson opened 11 years ago

sebnilsson commented 11 years ago

In PowerShell on Windows 8, follow these steps to reproduce:

  1. Create a new test-folder, for example C:\compass-test
  2. In PowerShell create compass-project here with compass create
  3. Create a subfolder in C:\compass-test\images, named sprites
  4. Add images to C:\compass-test\images\sprites-folder
  5. In screen.css add @import "sprites/*.png"; and @include all-sprites-sprites;
  6. Navigate to another folder, for example "C:\"
  7. Execute compass compile "C:\compass-test"

You will get the following error-message: No files were found in the load path matching "sprites/*.png"....

To get expected behavior: navigate with PowerShell to C:\compass-test and just execute compass compile.

scottdavis commented 11 years ago

compass version?

sebnilsson commented 11 years ago

Latest Ruby-gem from yesterday, so it should be 0.12.2.

aramando commented 11 years ago

This is a problem for me too. We can't use Compass spriting AND integrate Compass into our automated build process until this is resolved.

mirkovnemanja commented 11 years ago

Hello,

can you tell me please what you put for images source path in this file (config.rb)

tell me please what is root for your project? http://screencast.com/t/RThoZivNvG

aramando commented 11 years ago

For me it's this line: images_dir = "images"

sebnilsson commented 11 years ago

For me it's all the default values from compass create.

aramando commented 11 years ago

@sebnilsson I've just found that it works if you use slashes in the path argument instead of backslashes

mirkovnemanja commented 11 years ago

For me it's this line: images_dir = "images"

can you tell me what is your root ?

for example in my project this is root folder http://screencast.com/t/2SQK3mVD2

in compass folder you can find config.rb

http://screencast.com/t/C9EyQyIh

source for images is in img folder

img/sprites/ ... images for sprites

in config I was wrote this http://screencast.com/t/9odOg7uvo

then I wrote i scss file this

@import "sprites/*.png";

if you want space betwen sprites

$sprites-spacing: 20px;

for some element

.some_selector { @include sprites-sprite("image_name", false, 0px, 0px); }

aramando commented 11 years ago

Everything in my project is normal as per the defaults for compass create.

To be honest I don't think the paths or project layout are an issue. The problem is that the path of the Compass project passed by argument to compass compile needs to use forward-slashes, even when it's a Windows machine and would therefore naturally use backslashes.

This is obviously a bug with a very simple workaround, but it should at least be clearly documented.