score:0
an easy solution would be to use eclipse wild web developer:
https://github.com/eclipse/wildwebdeveloper#-get-it-now
the editor will simplify developing with web technologies. besides automatically compiling scss files to css files it provides many more features. check them out, i think you will like them.
score:1
i posted about this recently here: http://mikekelly.myblog.arts.ac.uk/2015/02/09/sass-with-eclipse-in-os-x/
my post refers to os x but it should be easy enough to adapt the process to other setups. here's the text from my post:
preparation
1. make sure ruby is installed. you’re going to need this as sass is a ruby app. os x should have ruby installed by default. to check, open a terminal window and enter:
ruby -v
this should display the version information, something like:
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
if you don’t have ruby, install it now. come back once you’ve figured it out.
if you develop using ruby at times, you are likely to be using rvm to manage different ruby versions. if you’re using rvm we need to take some precautions. don’t worry – we don’t need to get rid of rvm. we just need to make sure we install sass to the system version of ruby.
let’s check to see if we have rvm installed:
rvm -v
if we get version information back, then we have rvm. (if we don’t we can just move on to step 2 below.) let’s see which versions of ruby we have installed:
rvm list
this should show you a list of ruby versions, along with info. about which one is the default and which is the current version. we want to install sass to the os x default version of ruby, not the rvm-installed versions, so enter this:
rvm use system
and now check again on our current ruby version:
ruby -v
ok, if we’re happy that we have ruby and that we’re using the os x default ruby, let’s proceed.
2. install sass
do we have sass?
sass -v
if that doesn’t return version information, you will need to install sass:
gem install sass
if you get permission errors, use sudo:
sudo gem install sass
once you have installed sass, let’s check on its location:
which sass
that should return:
/usr/bin/sass
if a different path was returned, look again at the information above about rvm.
ok, now that we have sass installed in the os x default version of ruby, we can now switch back to a different version of ruby via rvm, if required.
set up a builder in your eclipse project
in eclipse, we’re going to use a builder to set up sass auto-compilation. ctrl-click on the title of your project in the explorer view (i’m working on a php project in this case, so i’m using the php explorer view.)
select properties.
click on builders, then on new… to make a new builder.
select the program option and click ok.
now we can give our builder a name, e.g. sass.compiler
in the main tab we need to put in the path to the installed sass application:
/usr/bin/sass
n.b. if you were using sass with an rvm-installed ruby, at this point you might have tried putting in something like:
/users/myusername/.rvm/gems/ruby-2.1.5/bin/sass
however that gives problems as sass then tries to find required resources but they're not in the path, and so the operation fails with the error:
sass env: ruby_executable_hooks: no such file or director
hence the need to install sass into the os x default version of ruby.
now we need to pass the appropriate arguments to sass, so that it knows what to do and what files to do it with. if we were running sass from the command line, we would probably do something like this at the start of our development session:
sass --watch sourcefolder:destinationfolder
in a real project that might look something like this:
sass --watch app/sass:public/stylesheets
this is a one-off command which forces compilation of any scss files in app/sass
, into css files in public/stylesheets
, whenever changes are made to the scss files. however, we want our builder to trigger the compile process each time we save our scss files, so --watch is inappropriate.
if we enter:
sass --help
we discover that the option we want is --update
. luckily this works just like --watch
in that it checks the designated folder recursively – so if we have many folders with scss files, we just specify a common parent folder.
you may have some scss files which you want to include into other scss files, and should not be compiled into their own css files. if that is the case, rename those files with an underscore at the beginning, e.g. rename mixins.scss
to _mixins.scss
sass will still recognise those files for inclusion, but won’t compile css equivalents.
in my arguments field i have this:
--update ${workspace_loc:/project1/htdocs/theme}:${workspace_loc:/project1/htdocs/theme} --sourcemap=none --style compressed
in my case, the scss files are in the same folder as the compiled css files, so my source folder and destination folder are the same. i used the browse workspace button in one of the form fields to generate the ${workspace_loc}
placeholder values for my source folders and destination folders.
i also added a few more sass options – one to turn off the generation of .map files, the other to output css in a compressed style.
under the build options tab i have allocate console
and during auto builds
ticked, but nothing else.
click on ok to finish.
now, when i edit one of the scss files in my project1/htdocs/theme
folder, in the eclipse console view i see that sass is doing its work, compiling the scss into css. success!
alternative method
use webstorm ; )
Source: stackoverflow.com
Related Query
- Eclipse IDE and Sass
- How to build and run Maven projects after importing into Eclipse IDE
- What is the difference between Eclipse with Spring IDE plugin and Spring Tool Suite alone?
- "Launch Failed. Binary Not Found." Snow Leopard and Eclipse C/C++ IDE issue
- Kotlin And Java In The Same Project Using Eclipse IDE
- Eclipse IDE for C/C++ and Java
- Scala Error: Could not find or load main class in both Scala IDE and Eclipse
- Error: JavaFX runtime components are missing - JavaFX 11 and OpenJDK 11 and Eclipse IDE
- Is it currently possible to build Eclipse Plugins by Maven AND have nice IDE Integration?
- Eclipse IDE - Android Graphical Layout and XML Layout Side by Side
- Is it possible to use sysout without class and main method in Eclipse IDE using Java 9?
- Difference between Eclipse IDE for Java EE Developers and Eclipse Juno
- How can use mingw-w64 and MSYS2 with any IDE like eclipse or codeblocks?
- Pattern based file selection and deletion in Eclipse IDE
- Error: Path Must Include project and resource name:/<jar file name> in eclipse IDE
- Is there a reason to have both Eclipse IDE for Java and also Eclipse IDE for Java EE?
- Different class size between Eclipse IDE and javac
- How to Validate HTML, CSS and JS in Eclipse IDE
- Interesting generics-related discrepancy between javac and Eclipse IDE compiler
- Is it possible to use Eclipse IDE and GAE plugin to develop and deploy Scala Applications with PlayFramework?
- Set up eclipse for Ext js and spket IDE plugin
- How do I install ANTLR IDE with Eclipse Juno and PDT (PHP)
- Eclipse as an cross platform IDE for C++ code on Linux and Windows
- How to version control an Android project on Github and use intellij and eclipse IDE by different team members?
- What is the difference between Eclipse IDE for Java EE Developer and Eclipse for Mobile Developer?
- Liferay: Fix the Error in eclipse by using Liferay IDE and own project folder organization
- Eclipse Neon: How to setup JavaEE and Javascript in one IDE
- Add JSON class folder and import in Java and Eclipse as IDE
- Eclipse IDE for (Embedded C/C++) Developers 2020-12: Classic dark theme deep black color background and text in menu
- Problems using FFTW library in Linux and Eclipse IDE
More Query from same tag
- Can't use localhost version of glassfish 4.1 server on eclipse Luna
- The expression of type x is boxed into X?
- Eclipse Plugin Development: Context menu on extension point org.eclipse.ui.bindings does not contain New -> Key
- Is it possible to work on multiple bug fixes using Eclipse & SVN?
- PMD errors unable to resolve in java using eclipse
- Grails - Development advice - Where do I find Plugin APIs / Troubleshoot errors / Make life easy for myself
- What is the alternative way for configuring tomcat context file with <Loader delegate = true />
- Automate import of Java (Android) projects into Eclipse workspace through commandline
- Eclipse BIRT: Debugger throws "Unhandled event loop exception"
- Cannot connect to VM: socket operation on nonsocket - configureBlocking
- Add popup action for Java projects in an Eclipse plugin
- How can I make a horizontal sliding calendar in android eclipse?
- Delete email account from android emulator?
- SWT application is running from Eclipse IDE, not running when I create a jar via Maven and run. Gives UnsatisfiedlinkException
- selection in CheckboxTableViewer on win7 is not working
- Eclipse does not show MySQL driver when creating a new database connection
- Project not in eclipse build path
- Where to put custom xml file? can't create
- Putting media into an Access Database using Java
- What’s the use of "System version" in eclipse "Driver Definitions"?
- Works in Eclipse but not in Jar
- Retrieve active key binding using a commandId
- Eclipse Kepler RCP CoolBar Actions CSS
- BufferedReader not seeing end-of-file on StdIn when run under Eclipse
- Error converting dynamic web project to Maven Project
- No repository found containing: org.eclipse.update.feature,org.eclipse.emf.ecore
- Maven errors while building Trace Compass
- Cannot find or load main class from .jar file
- “Java(TM) Platform SE binary has stopped working” error while running a plugin project in Eclipse Kepler
- A doxygen eclipse plugIn automatically generating stub documentation?