Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I setup compass on netbeans 7.4

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

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

Here is an example error:

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";

Thanks

like image 642
Dieter Gribnitz Avatar asked Oct 04 '13 07:10

Dieter Gribnitz


2 Answers

  1. In NetBeans, click the File > Project Properties menu item.
  2. In the dialog that opens, select the CSS Preprocessors category.
  3. At the bottom of the Sass properties is Compiler options. Enter --compass

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"
like image 111
user19292 Avatar answered Oct 26 '22 06:10

user19292


Another way that you can add Compass to all SASS projects without adding the argument to each project is by going to Tools > Options > Miscellaneous > CSS Preprocessors and adding " --compass" to the end of the Sass Path.

For example, mine reads "C:\Ruby200-x64\bin\sass.bat --compass".

like image 35
Josh Avatar answered Oct 26 '22 06:10

Josh