Nashmeyah
Posted on March 8, 2021
Hey Guys and Gals!
Currently I am working on a little somethin' somethin' and for the first time I had to start using Sass! So, of course I thought of writing a blog on setting up.
-
Set up a package.json file so that you can alter Sass settings.
npm init
-
Install Sass
npm install node-sass
Inside the package.json file, (on windows) press ctrl+f and search sass, there you will find it as part of the packages installed.
- VS Code Extension or npm.
Here you will have to decide whether you want to install the extension on your VS Code then run sass server which you can find it by typing Live Sass Compiler in the extensions and install it. On the lower right hand side, you can click watch sass and that will start the server. Or, you can alter the package.json file and run the sass through the terminal.
locate this in the package.json file,
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
change "test" to "sass" and add the following,
"scripts": {
"sass": "node-sass -w scss/ -o css/ --recursive"
},
now you can run the sass script through your terminal by typing this command
npm run sass
Posted on March 8, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.