How to use SASS with Netbeans 8.0.1
Yes, when you save the file, the css should be created/updated. I think you have wrong mapping for the input/output directories. The paths need to be relative to site root/web root. I don't know for sure what your project is (HTML5 or PHP or Java Web or other?), but if you have Java Web project, then the paths need to be
resources/scss -> resources/css
How to use Sass with NetBeans on Linux / macOS
The issue is that --cache-location
is no longer supported and should be removed. All of the original parameters are used by "$@"
. To remove the first two parameters, you should be able to use "${@:3}"
(see Process all arguments except the first one (in a bash script)), but somehow that resulted into a "Bad substitution" error for me. So I opted to use shift 2
to remove them:
#!/bin/sh
# Copyright 2016 Google Inc. Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
# This script drives the standalone Sass package, which bundles together a Dart
# executable and a snapshot of Sass. It can be created with `pub run grinder
# package`.
follow_links() {
file="$1"
while [ -h "$file" ]; do
# On Mac OS, readlink -f doesn't work.
file="$(readlink "$file")"
done
echo "$file"
}
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
path=`dirname "$(follow_links "$0")"`
shift 2
exec "$path/src/dart" --no-preview-dart-2 "-Dversion=1.14.1" "$path/src/sass.dart.snapshot" "${@}"
Make sure to keep the original file and create a copy to only be used with NetBeans and make the change there.
macOS (Home Brew)
If you are looking for the Dart Sass install location (after installing it with Home Brew), it is located here:
/usr/local/Cellar/sass/{version}/bin
macOS (node.js)
When using node.js, you will run into the "env: node: No such file or directory" issue.
To work around that I created (make sure you make it executable (chmod a+x
)):
/usr/local/lib/node_modules/sass/sass_nb.sh
and added:
#!/bin/zsh
export PATH="$PATH:"/usr/local/bin/
shift 3
sass ${@}
NetBeans 11+
On NetBeans 11 and 12 I had to use shift 3
instead of shift 2
.
Netbeans - installing SASS
Your path environment variable points to the wrong folder
Your Path to ruby is C:\Ruby193\bin
Go back and edit your path environment variable to point to C:\Ruby193\bin . At the moment you have C:\Ruby\192\bin
EDIT
And Now remove the backslash between Ruby and 193.
Your Path is set to : C:\Ruby\193\bin :-) !
your .bat is in Folder : C:\Ruby193\bin
TIP
Go to Options
Miscellaneous --> CSS Preprocessors
check : Generate extra information (debug)
Sass output error in Netbeans 8.2
In your Sass install directory, in file sass.bat, after the command:
set arguments=%*
add the following (replace username with your windows username)...
set arguments=%arguments:--cache-location =%
set arguments=%arguments:C:\Users\username\AppData\Local\NetBeans\Cache\8.2\sass-compiler =%
set arguments=%arguments:--debug-info =%
This strips out all of the arguments that are no longer accepted.
SASS In NetBeans 7.4
OK, I've found something pretty simple.
Assuming you've installed Ruby200 and NetBeans 7.4 on your system already.
1 - Start "Start Command Prompt with Ruby" and type sass -h
.
Sidenote: If you don't have Sass installed do: gem install sass
and you'll get latest version of Sass. In NetBeans setup the CSS Preprocessors by clicking on Tools > Options > Miscellaneous > Sass path click on Search and you get C:\Ruby200-x64\bin\sass.bat
You will get a punch of options for Sass including --style NAME
.
2 - Go to your NetBeans project, right click at the top level of it
3 - Select "Set Configuration" > Customize, then window called "Project Properties" pops up
4 - On Project Properties window select "CSS Preprocessors", then look for "Compiler Options"
5 - Use --style compact
for compact css output.
Also available are --style compressed
, --style expanded
Screenshots
Related Topics
Getting Rails to Accept European Date Format (Dd/Mm/Yyyy)
Error When Trying to Create Heroku App on Windows
Ruby Console Input Halting at 1024 Characters
Any Ruby Library to Inspect What Are the Arguments That a Certain Methods Take
Recursively Convert Hash Containing Non-Utf Chars to Utf
Ruby Tcpserver to Get Client Ip Address
Why Are Parenthesis Sometimes Required in Ruby
Restart Rails Server Automatically After Every Change in Controllers
Access 'Self' of an Object Through the Parameters
Can't Find a Route with an Underscore or Doesn't Treat It Properly
Byebug Fully Supports Windows or Not
Why Does Ruby '**' Operator Have Higher Precedence Than Unary '-'
Array#Uniq with Block Equivalent in Ruby 1.8.7
Handling Has_One Nested Resource in Rails 3
Intelligently Generating Combinations of Combinations