How can I find out which version of Sass I use when running gulp-sass?

I just started using gulp-sass , is there a β€œsimple” way to find out which version of Sass is used?

I don't think this is too important, 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 know which version of Sass is used, I try to follow this type, gulp -sass is a shell for node-sass , which in turn provides Node bindings for libsass , which is the C compiler for Sass .

So, to find out which version of Sass is used in my environment, I have to follow the chain and try to determine which version is used at each step and which version it uses for the next step.

Surely there should be an easier way?

+5
source share
3 answers

We can agree that from node-sass you can get versions using:

 var sass = require('node-sass'); console.log(sass.info); 

From gulp-sass you can send data that will be executed using node-sass . So something like this should do the trick:

 var gulp = require('gulp'); var sass = require('gulp-sass'); console.log(sass.info); 

This will be .info () from node-sass, which ultimately makes the call, giving you both the version and the version of libsass.

+2
source

Take a look at node_modules/grunt-sass/node_modules/node-sass/package.json

 "libsass": "version" 
+2
source

You can find out the version of Sass in Node-sass directly from the terminal using the following node -e 'console.log(require("node-sass").info)'

0
source

All Articles