Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Expose Sass lang version via node-sass API and CLI #1534

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

am11
Copy link
Contributor

@am11 am11 commented May 7, 2016

API Usage:

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

/*
node-sass       3.7.0   (Wrapper)       [JavaScript]
LibSass         3.3.6   (Sass Compiler) [C/C++]
Sass            3.4     (Sass Language) [Sass]
*/

CLI Usasge:

node-sass -v

node-sass       3.7.0   (Wrapper)       [JavaScript]
LibSass         3.3.6   (Sass Compiler) [C/C++]
Sass            3.4     (Sass Language) [Sass]

Related to sass/libsass#2021.

cc @chriseppstein

@@ -279,6 +279,7 @@ function getVersionInfo(binding) {
return [
['node-sass', pkg.version, '(Wrapper)', '[JavaScript]'].join('\t'),
['libsass ', binding.libsassVersion(), '(Sass Compiler)', '[C/C++]'].join('\t'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whilst you're at it LibSass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@xzyfer
Copy link
Contributor

xzyfer commented May 8, 2016

This will have to wait until v3.8.0.

@xzyfer xzyfer added this to the next.libsass milestone May 8, 2016
@nschonni
Copy link
Contributor

nschonni commented Sep 7, 2016

Should we get this in for the next release? Think this test needs to be updated

it('should return a correct version info', function(done) {

@xzyfer
Copy link
Contributor

xzyfer commented Sep 7, 2016

I'm not sure anyone will understand this but I have no objections.

@am11 am11 force-pushed the master branch 6 times, most recently from 14a76d8 to df6dd7b Compare September 7, 2016 16:52
@am11
Copy link
Contributor Author

am11 commented Sep 7, 2016

Rebased and update the test file accordingly.
After cherry picking sass/libsass@01f370a on top in src/libsass, it passed the version check test on both Mac and Windows.

API Usage:

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

/*
node-sass       3.7.0   (Wrapper)       [JavaScript]
libsass         3.3.6   (Sass Compiler) [C/C++]
Sass            3.4     (Sass Language) [Sass]
*/
```

CLI Usasge:

```sh
node-sass -v

node-sass       3.7.0   (Wrapper)       [JavaScript]
libsass         3.3.6   (Sass Compiler) [C/C++]
Sass            3.4     (Sass Language) [Sass]
```
test/api.js Outdated
assert(info.indexOf('[JavaScript]') > 0);
assert(info.indexOf('[NA]') < 0);
assert(info.indexOf('(Sass Compiler)') > 0);
assert(info.indexOf('[C/C++]') > 0);
assert(info.indexOf('(Sass Language)') > 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is the same as the others, but maybe we can fix up the message parameter at the same time. The current failure just says AssertionError: false == true, which doesn't really tell us anything 😉

Copy link
Contributor Author

@am11 am11 Sep 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat idea! I have added some assertion messages in 8e037ee a0da706 . :)

@xzyfer
Copy link
Contributor

xzyfer commented Sep 8, 2016

@am11 I was under the impression sass/libsass@01f370a had been released. We will be shipping 3.3.7 soon.

@nschonni nschonni modified the milestones: 4.0, next.libsass Sep 15, 2016
@nschonni nschonni self-assigned this Dec 23, 2016
@nschonni nschonni modified the milestone: 4.0 Jul 14, 2017
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this pull request Apr 7, 2024
…n-interpolate

Fix regression for interpolation adding additional escapes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants