I'm learning Sass and here is my playground. You can find the tutorials through (Net Ninja)[https://www.youtube.com/@NetNinja] youtube channel.
- Install nodeJS (to keep track of the dependencies)
npm install
npm init
It creates node_modules and package.json
-
Install VS Code extension: Live Sass Compiler (to compile scss files into CSS files)
-
Install Gulp and set dev dependencies
npm install gulp gulp-sass sass --save-dev
It updates package.json and creates package-lock.json
-
Create the Gulp file (to build and update CSS files from Sass files)
-
Edit package.json to fix the problem with
gulp
command on terminal
"scripts": {
"gulp": "gulp"
},
- Create HTML file (index.html)
- Create Sass file (index.scss)
- Run
npm run gulp
ornpx gulp
command on Terminal It creates CSS directory and compiles CSS files