【发布时间】:2013-09-28 00:21:57
【问题描述】:
我正在使用 JRuby 使用 compass 来编译 sass css
我知道如何使用指南针编译 scss 文件:
compiler = Compass::Compiler.new(
# Compass working directory
'.',
# Input directory
'styles/scss',
# Output directory
'styles/css',
# Compass options
{ :style => :scss}
)
compiler.compile('test.scss','test.css')
但是我想编译一些我在字符串中而不是在文件中的指南针源 我一直在研究 Compass::Compiler 源代码,但我还没有看到任何编译 scss 字符串而不是文件的方法
注意: 直接使用 SASS 编译器而不是指南针我可以编译一个 scss 字符串
engine = Sass::Engine.new(source,:syntax => :scss)
result = engine.render
【问题讨论】:
标签: sass compass-sass