How to set sass with compass and coffeescript in meanio - coffeescript

I find mean.io (MongoDB Espress Angular Node) very interesting.
I'm used to work with coffeescript, sass and compass.
I would like to start a project with all these and not with pure js and css as the default setup does.
Is it possible to do it?

Yes it is possible but right now there is a bit of overhead required to get setup.
Have a look at https://github.com/gruntjs/grunt-contrib-coffee for info about converting coffescript to js using grunt. mean.io uses a lot of the grunt tools.
I would also recommend emailing a colleage of mine lior#linnovate.net. He has recently been building a sass package using the mean package system.
To see currently available packages have a look at http://www.mean.io/#!/packages

Related

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

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.

How to use npm packages with ReasonML?

I'm quite experienced with ReactJS and now I'm trying to learn ReasonML. But one thing that I've been struggling to understand, is how to import npm packages with React/Reason.
The instructions on the website are kinda unclear to me (https://reasonml.github.io/guide/javascript/interop/).
So, if I have a React/Reason project and want to use a npm package, how do I do it? How do I import it, using Reason lang?
First off, thanks for the feedback! I'll make sure to get this improved.
Now, to be able to use a javascript library published on npm, you'll need to either find or make some bindings for it, as a bridge between Reason/BuckleScript and JavaScript. Ideally, the bindings you need have already been written (or generated) and published to npm, but in case it hasn't you'll have to write them yourself.
Most readily available bindings are listed in redex, the package index, and will include instructions on how to use it. But if they don't, all you need to do is run npm install --save <package-name>, as usual, then add the package name to the bs-dependencies array in bsconfig.json (see also the BuckleScript manual). Make sure to run bsb -make-world to get the new dependency built, then you should be able to use the modules exported by the bindings directly.
If there are no bindings, and you want to make your own, all you need to do is add the javascript package as normal using npm install --save <pacakge-name>, then just start writing externals. How to do so is described in the BuckleScript manual. You may also find my FFI cheatsheet useful.
Lastly, you're welcome to join us on our Discord where there's lots of friendly people eager to help!

VS Code 3rd Party Intellisense not working

I am using the latest release build of VS Code (1.13.1) and I am having some issues with the IntelliSense when trying to use 3rd party libraries.
My example is using JQuery, I have installed JQuery via NPM and imported this into my main.ts file. according to the VS Code website, the IntelliSense should automatically pick up common libraries and display functions and members that are available to that language, so when I type $ and click the '.' key I should see "ajax" for example. I can get the IntelliSense working by installing the types in NPM (npm install #types/jquery).
Am I doing something wrong that might be stopping the automated process from occuring?
Many thanks
Stuart

Paraview Build in VS

I´m trying to build paraview from source, therefore using:
Windows 7
Visual Studio 2010
Qt 4.8.7
Python 2.7.8
msmpi 7
paraview source, version 5.1.0
In CMake I can choose different options to specify what functionality to include into the build process. I tried different combinations, like setting BUILD_EXAMPLES or PARAVIEW_USE_MPI, respectively. Now I have got following questions:
When I set BUILD_SHARED_LIBS and PARAVIEW_ENABLE_PYTHON as well (besides others), configuring and generating the project with CMake is successful, but compiling in VS fails; it keeps freezing right after starting the compilation. Did anybody experience the same problem and how did you solve it? (By the way, if I unset BUILD_SHARED_LIBS it works, but I don´t want a static build of Paraview).
By using the combination BUILD_EXAMPLES, BUILD_TESTING, PARAVIEW_BUILD_QT_GUI, PARAVIEW_ENABLE_CATALYST, PARAVIEW_ENABLE_PYTHON and PARAVIEW_USE_MPI the same problem as described in 1.) occurs, but that is more or less what I need to use Catalyst to perform in-situ analysis of my FEM simulation. (Incidentally, if I unset BUILD_TESTING in the above combination it works, but I need CTest to test the Catalyst examples as described here. Does anybody now how to fix that problem?
As shown at GitHub, some examples have been updated to work properly in Paraview 4.4. Is my version of Paraview (5.1.0) unsuitable for the Catalyst examples? Is that the reason why VS is always hanging up for particular variable settings in CMake and which version of Paraview is most suitable to get the Catalyst examples going?
I'd appreciate any help!
That's odd! There's no known reason for this. Although I haven't used VS2010 explicitly, we do have dashboards testing with 2013 and I build with VS2015 with no issue.
I'd recommend using the Ninja as the builder rather than the IDE, however. Just run cmake-gui.exe from appropriate VS studio command prompt and pick Ninja as the build generator. Then, to build, just run ninja in the build directory.

Working with nodejs and mongodb

Are there any libraries or frameworks that allow me to work with mongodb and nodejs that don't require a npm install ? More precisely I'm working on windows.For example i managed to find a library for working with websockets(https://github.com/ncr/node.ws.js) and simply requires you to include the file.
Is it absolutely necessary to use a library ? I am asking because all the tutorials use one, doesn't node have a module for this ?
You don't need npm to use most modules - you can download them (e.g. from their GitHub page as a zip file) and then put them in your project folder. Then require them:
var mongodb = require('../lib/module-folder-name');
Some useful libraries:
MongoDB native driver:
https://github.com/christkv/node-mongodb-native
Mongoose, a higher level ORM for MongoDB:
https://github.com/learnboost/mongoose/
evilcelery has the best answer +1 from me;
Most anything you run across for npm will work just as he said, and lib is the best convention to do it with.
To expand on his links a bit The module list he refereed to is found:
https://github.com/joyent/node/wiki/modules
http://search.npmjs.org/ is a bit more user-friendly.
Also if you wish to include things globally similar to npm you can do what it does with things like html and put it in the lib dir where you originally compiled it with the Makefile (note: you may not need to rebuild it but I beleave you do)
There are a lot of mongodb related projects/libs enjoy!
interestingly:
Blockquote Contrary to the belief of many, "npm" is not in fact an abbreviation for "Node Package Manager". It is a recursive bacronymic abbreviation for "npm is not an acronym".
source: https://github.com/isaacs/npm/blob/master/doc/faq.md#readme
You can use builtin net.sockets module
var net = require('net');
var server = net.createServer(); // to listen
var socket = net.socket; // to connect
It might you to work with any network application and write raw requests.
A lot of modules written on js so you can not to install them with npm, but require from your project folder.
I haven't tried it, but this should enable you to get node packages with windows: https://github.com/japj/ryppi . It will require you to download Python.