简体   繁体   中英

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.

根据https://github.com/chriseppstein/compass/issues/949它应该在sass 3.1.20中修复但在我的盒子上没有快乐...仍然是Windows行结尾

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM