Sass 禁用行注释指南针不工作

Sass 禁用行注释指南针不工作,sass,compass-sass,Sass,Compass Sass,我试图在compass config.rb文件中禁用行注释,但我仍然在正常css文件中获取scss文件的行引用 # Set this to the root of your project when deployed: http_path = "/" css_dir = "stylesheets" sass_dir = "sass" images_dir = "images" javascripts_dir = "javascripts" # You can select your prefe

我试图在compass config.rb文件中禁用行注释,但我仍然在正常css文件中获取scss文件的行引用

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"

# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = false

我重新启动了指南针。保存my.scss后删除了我的缓存文件夹和css文件。我做错了什么?

我的config.rb文件被忽略了。通过使用命令行进入文件夹并在文件夹中键入
compass watch
来修复此问题

仍然困扰着我,因为我的WAMP文件夹中还有其他项目,我只使用compass watch[project]来处理这些项目,而那些项目的
config.rb
文件不会被忽略。

即使输出样式为“压缩”,我也无法删除多行注释,sass/scss文档还建议不删除它们(只删除带有“/”的单行注释)

我的解决方案是在sass生成最终输出后,简单地应用Perl one liner从.css文件中手动删除注释:

sass -fCE utf-8 -t compressed application.sass application.css
perl -pi -e'BEGIN{$/=undef}s#/\*.*?\*/##gs' application.css
这对我有用

compass_config do |config|
  config.sass_options = { :line_comments => false }
end

确保指南针手表没有运行。如果是这样,请在对config.rb进行更改后停止并重新启动它file@cimmanon什么?这是唯一对我有效的方法。。。上面所有的都没有。