0

所以,我正在尝试设置我的 wp 主题以与 sass 一起使用。

我已将 style.css 重命名为 style.scss 并将其放入名为“sass”的文件夹中。然后我创建了一个名为 config.rb 的文件。我在里面写了

/* config.rb in the theme's root. */ 
css_dir = "/"
sass_dir = "sass"
output_style = :compressed

然后我尝试使用 compas.app 来查看文件夹(即在 FTP 服务器上,安装在 Finder 中)。我选择主题的根文件夹,然后按确定。两秒钟后,我收到一个错误:

'(RegexpError) 未指定重复运算符的目标:/* config.rb 在主题的根目录中。*/org/jruby/RubyKernel.java:1112:in eval' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/serialization.rb:24:inparse_string'/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/serialization.rb: 15:_parse' org/jruby/RubyIO.java:1139:in打开'org/jruby/RubyKernel.java:296:open' file:/Applications/compass.app/Contents/Resources/Java/lib/java/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/1.8/open-uri.rb:32:in打开'/Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/serialization .rb:14:in _parse' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/file_data.rb:7:innew_from_file' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/inheritance.rb:204:in with_defaults' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/file_data.rb:6:innew_from_file' /Applications /compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/helpers.rb:42:inconfiguration_for' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/configuration/helpers.rb:97:inadd_project_configuration' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/commands/project_base.rb:31:in add_project_configuration' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/commands/project_base.rb:25:inconfigure!' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/commands/project_base.rb:15:ininitialize' /Applications/compass.app/Contents/Resources/lib/ruby/compass_0.12/compass-0.12.2/lib/compass/commands/update_project.rb:37:in初始化'文件:/Applications/compass.app/Contents /Resources/Java/compass-app.jar!/ui/tray.rb:417:in watch' file:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/app.rb:207:intry' 文件:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/ui/tray.rb :412:在watch' file:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/ui/tray.rb:153:inopen_dir_handler' 文件中:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/ui/tray.rb:71:在run' file:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/main.rb:115:inrun_tray' 文件中:/Applications/compass.app/Contents/资源/Java/compass-app.jar!/main.rb:131:in(root)' org/jruby/RubyKernel.java:1062:in需要'文件:/Applications/compass.app/Contents/Resources/Java/compass-app.jar!/main.rb:1:in `(root)''

4

1 回答 1

1

你必须调试它。

首先,将您的主题下载到本地驱动器并compass compile在其上运行。

然后在其上运行 Compass.App。

然后compass watch在远程文件夹上运行。

问题出现在哪一步?

于 2013-06-24T06:18:56.523 回答