Skip to content

Instantly share code, notes, and snippets.

@vi4hu
Last active April 13, 2023 18:43
Show Gist options
  • Save vi4hu/7f3bca77f6228ab7e6d025e2726b9933 to your computer and use it in GitHub Desktop.
Save vi4hu/7f3bca77f6228ab7e6d025e2726b9933 to your computer and use it in GitHub Desktop.
dart sass guide

Using Dart Sass with node and normally

If previously Installed

Checking if its dart sass or not

sass -v # output should not be Ruby sass
# Note: npm dart-sass is now sass

Unstalling if its Ruby Sass

sudo apt-get remove sass

Note: also remove the sass, scss and sass-convert file in your usr/bin dir.

Installing

NPM

npm install -g sass # dart sass
npm sass -v

linux

export PATH=$PATH:/location/to/dart-sass >> ~/.*rc

To watch Sass

npm i sass #for latest sass watching
sass --watch scss:css # or just -w

For React usage

npm i sass --save-dev

Testing

Unit test package for sass.

Lint testing for sass.

Some plugin libraries to enhance the linting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment