Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Dart Sass?

Tags:

The instructions on the website say:

You can install Sass on Windows, Mac, or Linux by downloading the package for your operating system from GitHub and adding it to your PATH. That's all—there are no external dependencies and nothing else you need to install.

I downloaded the Windows package from here: https://github.com/sass/dart-sass/releases/tag/1.10.1 and now what? Where do I place the zip? Do I need to extract it? I have no idea what this means - "To install Dart Sass 1.10.1, download one of the packages above and add it to your PATH." Sass is not being recognized when I try to check the version from the command line.

Can someone provide a step by step guide?

I've also installed Ruby, if it matters (but I don't want Ruby Sass, I want Dart Sass).

like image 561
anna Avatar asked Jul 28 '18 13:07

anna


People also ask

Is Dart Sass the same as Sass?

Dart Sass is the primary implementation of Sass, which means it gets new features before any other implementation. It's fast, easy to install, and it compiles to pure JavaScript which makes it easy to integrate into modern web development workflows. Find out more or help out with its development on GitHub.

Should I use Dart Sass?

If your sass files take time to compile and if Node-Sass supports all the features you used, then go with Node-Sass! If installing Dart-Sass(Dart VM) on your machine is not a problem, Dart-Sass is the best option. Also consider Node-Sass is deprecated and they won't add new features.


1 Answers

For windows 10

  1. Go here dart-sass and download dart-sass which is suitable for your operating system.

  2. Extract it where you want.

  3. Open windows search and search this "system environment variables" then click it to open. enter image description here

  4. Click "Environment Variables" enter image description here

  5. Under system varibles find the PATH variable, select it, and click "Edit". enter image description here

  6. If there is no PATH variable, click "New" and write here PATH. enter image description here enter image description here

  7. Go your dard-sass folder and copy directory. enter image description here

  8. Add your directory to the beginning of the variable value followed by ; (a semicolon). For example, if the value was C:\Windows\dart-sass, change it to C:\Users\Me\bin;C:\Windows\dart-sass. If there is not another directory just add your directory here. Then click "Ok". enter image description here

  9. Open "Command Prompt". enter image description here

  10. Write here "sass --version" and click enter to be sure it installed correctly. enter image description here

  11. Create style.scss and style.css file. enter image description here

  12. Write on Command Prompt "cd" then your directory(where is style.scss and style.css file). For example "cd Desktop\webdev" enter image description here

  13. Then write this "sass --watch style.scss style.css". Then minimize it. enter image description here

  14. That's it. You can open your text editor then style.scss file and write your Sass code. It's automatically compile to the css code.

https://katiek2.github.io/path-doc/

like image 146
black Avatar answered Sep 20 '22 20:09

black