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

我与影子孤独终老i 提交于 2019-12-03 16:36:28

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/6854575/how-to-configure-compass-to-generate-files-with-unix-line-endings-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!