如何在NetBeans 7.4上设置指南针 [英] How can I setup compass on netbeans 7.4

查看:98
本文介绍了如何在NetBeans 7.4上设置指南针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

netbeans 7.4中有一项功能,允许scss和更少的功能在保存时自动编译.

There is a feature in netbeans 7.4 that allows scss and less to auto compile on save.

我设法设置了scss进行编译,但是在使用罗盘编译scss文件时遇到了问题.

I have managed to set up scss to compile but I am having problems compiling scss files using compass.

这是一个示例错误:

Syntax error: File to import not found or unreadable: compass/css3.
          Load path: /www/site
    on line 2 of /www/site/app/View/Themed/Admin/webroot/scss/core.scss

当前指南针的导入方式如下:

Currently the compass is imported like so:

@import "compass/css3";

谢谢

推荐答案

  1. 在NetBeans中,单击文件">项目属性"菜单项.
  2. 在打开的对话框中,选择CSS Preprocessors类别.
  3. 在Sass属性的底部是编译器选项.输入--compass

那解决了您要问我的问题.但是,然后我又遇到了Compass的其他问题,因为它不知道文件的路径.为了克服这个问题,我在项目的根目录中创建了一个config.rb文件.这必须定义完整的项目路径和目录名称.而且,在Windows机器上工作时,斜线的方向和引号的类型非常挑剔.

That fixed the problem you are asking about for me. However, I then encountered further problems with Compass because it was ignorant of the paths to files. To overcome this I created a config.rb file in the root of my project. This had to define a full project path and directory names. Moreover, working on a Windows machine, it was fussy about the direction of slashes and types of quotes.

project_path    = 'c:\path\to\project'
css_dir         = "css"
sass_dir        = "sass"
images_dir      = "images"
javascripts_dir = "js"

这篇关于如何在NetBeans 7.4上设置指南针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆