When I install SASS with NPM, where is the executable on my computer? - eclipse

I am developing in Windows 10. I do some of my web development in Eclipse and like to use SASS in developing my CSS. Eclipse needs to access SASS in order to compile the SCSS into CSS.
I went to the SASS website and they give a variety of options for installing SASS. I chose to install it with npm and did so successfully on my C: drive. Now I need to know the name of the SASS executable and where it is on my C: drive so I can point to it in my Eclipse tool builders.
I've tried searching for files containing "sass" in the file name but the Windows search utility is useless: it's been running for hours and most of the file names it finds don't even contain "sass". It finds nothing at all when I search on "sass.exe".

I got it working on my own.
First, I should explain that I was initially using Ruby Sass but that wouldn't work when I tried to use it yesterday for the first time in a few months. I vaguely remember something about Ruby Sass being scheduled for deprecation so maybe that's why it stopped working suddenly? Anyway, I needed it to work again but found the information at the SASS website so vague as to raise more questions than it answered so I posted here.
Insomnia has me up in the middle of the night so I started digging and decided to try the SASS website again. This time, I opted for the "Install Anywhere (standalone)" instructions and grabbed Dart SASS. It wasn't intuitively obvious how to install that either but I searched here at StackOverflow and found this article, which I followed carefully.
I found that for my particular situation, I didn't need to create the two files, style.css and style.scss, and I didn't have to execute the watch command either. However, the syntax of the SASS command for the Eclipse Builder had changed a bit: --sourcemaps=none changed to --no-source-maps and I didn't need the --style parameter at all since the default value for style is exactly what I wanted, namely expanded. By the way, the executable isn't an .exe file, it's sass.bat.
Now my SCSS compiles to CSS cleanly and I'm back in business.

Related

gtk+ without msys2 mingw

On Windows, trying something with gtk+. I have downloaded Msys2, along with gtk+3.0.
Successfully compiled all the gtk+3.0 examples in the msys2 mingw-w64 terminal.
Now I want to move a bit further to try work without the msys environment.
I opened up cmd and navigated to where the example executables are compiled. Then I fired them up by typing "example.exe".
libgio-2.0-0.dll missing, not surprised. I go back to check the PATH environment of the msys environment, PATH=/mingw64/bin/:/usr/local/bin:/usr/bin/:/bin:/c/Windows/System32:..blablabla
So in the cmd environment I did set PATH=%PATH%;pathto/mingw64/bin; and run example.exe again.
This time it gave a very strange error cannot find entrypoint inflateValidate (in dll libpng16-16.dll)
So I checked, indeed there was no inflateValidate function in the dll. it seemed to me that something thought the function is in the dll and tried to call it but because it doesn't exist so it failed. What I don't understand is that why did it not fail in the msys environment but failed in the windows environment. And does that bring any impact to me if I am going to ship any gtk application? I thought simply distributing the relevant dll would be enough.
I have tried instead of adding the mingw64/bin path to the PATH variable, but copying the required dll the the execute location 1 by 1, but at the end it still gave the same error.
I have also tried to search for other libpng*.dll in my computer, none of them contained the inflateValidate function.
If anyone know whats going on please shed some light to the question.
I might be very late to the party but I ran into the same issue yesterday (missing the inflateValidate symbol) and after checking the contents of the zlib1.dll file could ascertain that the function is just not there.
I downloaded another version (specifically this one https://sourceforge.net/projects/uqm-mods/files/latest/download, though I am in no way affiliated to this project) and saw that the inflateValidate symbol was indeed declared, so I suppose that the zlib bundled with your files is not up to date with the libpng requirements.
This solved my problem. I hope it solves yours too.

Go to Definition and Find References not working

I'm interested in Visual Studio Code, the new editor Microsoft released a year and a half ago. If I can get the hang of it, I think I'll switch to it on my Ubuntu. So I've done a "Hello, World!" program trying to find how to configure and use VSC's features.
I've seen on VSC's site and on some videos how to configure a folder so that you could go to definitions and find references, but it nonetheless doesn't seem to work for me. I don't know if I've done something wrong or if it's a bug on VSC's part.
Here is what my folder looks like. I've basically set up the tasks.json, launcher.json and c_cpp_properties.json files with default setup (compiling and debugging work just fine), but as you can see in the screenshot below, no indexing seems to be taking place since no symbol is found in main.cpp (even if I add new functions). Also, trying to find references of the i variable leads to No results, and asking to find i's definition doesn't do anything.
I've already tried :
Reinstalling VSC
Removing plugins
Adding the ${workspaceRoot} folder in the c_cpp_properties.json's include for Linux
Here's the screenshot. Notice my installed extensions on the left.
Nothing I've seen has helped me understand what the problem is. Have I done something wrong? I'm on Ubuntu 16.04.
Several binaries of the Microsoft C/C++ vscode extension for Linux are 64-bit. Therefore, if you're on 32-bit Linux, some of the cpptools functionality won't work. You can check the issue on GitHub.
I work also with Microsofts plugin C/C++ in a quite big C project. The C symbol references works good. Maybe you can try to add your projects root directory to "includePath" in c_cpp_properties.json.
But I am pretty sure, that local variables of functions are not parsed.
Maybe does the C++ intellisense plugin conflict with the Microsoft C++ plugin. can you disable the plugin provided by Austin
? The Clang plugin is also not necessary. The Microsoft plugin has Clang support and code completion integrated.
When I asked my question, I was on an Ubuntu VM. Yesterday, I installed an Ubuntu partition on my HDD, and vscode worked perfectly, with peek definition, find references etc.
After a few hours, I ended up in the same situation as when I made my post. But then I just closed and reopened VSCode, and it worked again. Definitely a VSCode bug.
EDIT : Seems to be the same issue as this one.

How to get useful files from a github package?

Although I've been using github for a while, but every now and then this problem pops up. From a github project, how do I know which filed/folders are actually what I need?(Generally, I don't need those files that are only used by developers)
Take this project (https://github.com/mupchrch/split-diff) for example, I am trying to install this plugin into my Atom editor so I can compare two files, but I find very little is said about how and which files are to be installed/copied, and to where. This "lack" of information happens to many many github projects I stumbled with. Some indicates npm install xxx which I am OK with, some says nothing at all, like the above example. So I conclude I must have missed some very important information regarding how to use github package, something that goes without saying.
Can anyone help me or give me any hint?
I noticed that here is a package.json file, which must indicate this package can be installed by npm. But I need more specific instructions:
Do I need to download all the files and folders? To where? And where do I launch npm install? Or as far as I know, Atom editor has its own install command (apm is it?), where do I run this apm?

Eclipse IDE and Sass

I've recently started using the Eclipse IDE for web development.
In the past when I've used Scout to complie my Sass.
Is there a way in Eclispe to automatically compile my Sass.
Is this the best option - http://www.only10types.com/2012/02/get-eclipse-to-automatically-compile.html
I've tried this but I get a BUILD FAILED becuase of
<apply dest="css" executable="/var/lib/gems/1.9.1/bin/sass">
I realise that executable needs to point to sass on my system but how do I find where sass is on my system?
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 ; )
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.

How to Stop Perl EPIC eclipse plugin showing errors

My eclipse tries to compile/build Perl files in my Java project and fails. I installed Perl EPIC just for syntax colouring, how can I get it to ignore errors?
I tried going into Project->Properties->Builders, and uncheck Perl Epic, this didn't change anything.
I'm using Eclipse :Helios Service Release 1
Build id: 20100917-0705
On Windows XP
I have basically the same issue as this question,
How can I set up Eclipse to edit Perl without the runtime checking?
I've been looking into similar issue for quite some time too. Apparently the Epic Perl plugin goes wildly checking anything/folder/file it finds inside the project, so like mine where I have config files, data directories, it goes inside and tries to validate "perl stuff", which evidently is an annoyance: the error log view displays a lot of useless information.
Did you try to uncheck the "Perl Auto Builder" ?
I'm not parsing this sentence in the context of your question: "My eclipse tries to compile/build perl files in my java project and fails."
Are you saying that you are running perl as a java project, and getting the inevitable error message because it is not java? Just wondering why you don't want to have your perl program set up as a perl project possibly referenced by your java project, assuming that that is what you are trying to do.
Generally, when I set up a perl project, I edit its properties and set its includes to match the current directory or local module paths. Assuming that there are self-written modules I must call, and they are not located on this machine (e.g. I wouldn't have FOO::smb on a windows machine -- it makes no sense. When I am developing for linux, I will put all my functions in there for convenience's sake)
In that case, I create a FOO directory in the workspace, and create a dummy FOO::smb module with however many stub functions in it to get me going and let my syntax highlighting and error checkign do their proper jobs for me. If I write dummy subs to match the real modules well enough, I can debug my scripts somewhat before uploading them. I figure that I should be well enough aware of what they are supposed to do anyway.
I will go so far as to dummy out CPAN modules assuming that installing them on my development workstation makes no sense or is impossible. Highlighting and syntax checking are both invaluable tools, and finding a way to make both of them work saves my sanity.