Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Compass to generate files with Unix line endings on Windows?

I just installed Compass 0.11.5 on Windows 7 with Ruby 1.9.2.

I have my development environment set up to use Unix line endings for all files.

I created an initial sass-test project and noticed that all the files it created had Windows line endings. I moved an existing .css file from another project (with unix line endings) into the sass folder and changed the extension to .scss. I ran the 'compass compile' command to generate the .css file for this new file and the .css file it created had Windows line endings.

I can't find any configuration options in the Compass documentation to force Compass to generate files with Unix line endings.

Is it possible to configure Compass to generate files with Unix line endings on Windows?

Update

After further investigation, there is an option to to pass configuration options to Sass from Compass.

Property Name   Type    Description
sass_options    Hash    These options are passed directly to the Sass compiler. For more details on the format of sass options, please read the sass options documentation.

Sass has an option for generating unix line endings:

:unix_newlines
If true, use Unix-style newlines when writing files. Only has meaning on Windows, and only when Sass is writing the files (in Rack, Rails, or Merb, when using Sass::Plugin directly, or when using the command-line executable).

It appears that adding the following line to the sass-test project's config.rb file should solve the issue:

sass_options = {:unix_newlines => true}

But, it doesn't have any effect on the resulting .css files created - they still have Windows line endings.

like image 507
jmohr Avatar asked Jul 28 '11 05:07

jmohr


1 Answers

According to https://github.com/chriseppstein/compass/issues/949 it should be fixed in sass 3.1.20 but on my box no joy... still Windows line endings

like image 84
olegtaranenko Avatar answered Nov 04 '22 07:11

olegtaranenko