I just started using gulp-sass, is there a "easy" way to find out what version of Sass, that is being used?
Not that I think it matters too much but I'm using gulp-sass in Visual Studio 2015 (CTP6).
I need to know because I want to use a Sass mixin which requires a certain minimum version of Sass.
At the moment, if I want to find out what version of Sass is being used, I try to follow the trail like this, gulp-sass is a wrapper for node-sass which in its turn is providing Node bindings for libsass, which is a C compiler for Sass.
So to find out the version of Sass being used in my environment, I have to follow the chain and try to work out which version is used in each step and what version it then uses of the next step.
Surely there must be an easier way?
We can agree that, from node-sass
you can get the versions using :
var sass = require('node-sass');
console.log(sass.info);
From gulp-sass
, you can send data which will be executed by node-sass
. So something like this should do the trick :
var gulp = require('gulp');
var sass = require('gulp-sass');
console.log(sass.info);
It's going to be the .info() from node-sass who get's called in the end, giving you both it's version and libsass's version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With