Coder Social home page Coder Social logo

Comments (3)

a-bentofreire avatar a-bentofreire commented on June 3, 2024

Hi,
Thank you.
I'm using:

npm install -g sass

and with this implementation of sass, it's --sourcemap.

If you do:

sass --help | grep 'map'

you will get: -sourcemap=TYPE

Also if you read the sass official documentation:
https://sass-lang.com/documentation/file.SASS_REFERENCE.html
It has written: sourcemap.
If seems that the dart-sass implementation uses an non-oficial way to passing the setttings

I would advice to switch to the npm version...if you don't mind the ton of extra packages :-(
or another "more" official version.
You can always modify it on the options dialog.

Sincerely,
Alexandre Bento Freire

from bracketstoix.

hmbgbw avatar hmbgbw commented on June 3, 2024

Thank you for your quick response.

Changing the command in the options section is a fair approach and works great.

Still I’m a little confused: the official recommendation on https://sass-lang.com/install leads to https://github.com/sass/dart-sass/releases/tag/1.13.0

The second option is: npm install -g sass, but :
“However, please note that this will install the pure JavaScript implementation of Sass, which runs somewhat slower than the other options listed here. But it has the same interface, so it'll be easy to swap in another implementation later if you need a bit more speed!”

If I take a look at the npm sass package (https://www.npmjs.com/package/sass), I read:

“This package is a distribution of Dart Sass, compiled to pure JavaScript with no native code or external dependencies. It provides a command-line sass executable and a Node.js API.”
Further down the page: “When installed via npm, Dart Sass supports a JavaScript API that aims to be compatible with Node Sass.”

Looking up https://github.com/sass/node-sass#sourcemap the option for usage in the Java Script API is spelled “sourceMap", but using the command line interface ( https://github.com/sass/node-sass#command-line-interface ) it is supposed to be --source-map.

Same when I look up sass -help on my windows 10 system (dart-sass-1.13.0):

=== Source Maps ========================
--[no-]source-map Whether to generate source maps. (defaults to on)

As far as I understand it, the dart-sass implementation is the official implementation, what I don't really understand is the different spelling of the sourceMap option. I assume that it has something to do with the fact that on my systems the compiler call is carried out on the command line interface and on your system using node.js – but that’s really only a wild guess because I don’t know anything about node.js :-(

Anyhow, thanks again for the great plugin,

Heiner

from bracketstoix.

a-bentofreire avatar a-bentofreire commented on June 3, 2024

You definitely have a point there.
The problem seems to be inconsistent implementation of that parameter across sass implementations but and I'm not so fond with npm dependency management so I understand people can prefer dart implementation.
To prevent breaking changes, I won't modify the way it's bracketstoix is configured, however, I will add info on the README and a tooltip on options dialog box to warn the users about it.
Thank you for the tip. It was helpful.
I will consider this issue closed.

Sincerely,
Alexandre Bento Freire

from bracketstoix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.