Skip to content

Instantly share code, notes, and snippets.

@najathi
Created February 22, 2021 09:04
Show Gist options
  • Save najathi/aee72ce5722513a1709eea03e966cfce to your computer and use it in GitHub Desktop.
Save najathi/aee72ce5722513a1709eea03e966cfce to your computer and use it in GitHub Desktop.
setup scss file in html
1. npm --version
2. npm init -y (or) npm init
3. npm install node-sass (or) npm install node-sass -D
4. run before add some changes on package.json file
"scripts": {
"sass": "node-sass -w scss/ -o dist/css --recursive"
}
package.josn file full code
---------------------------------------------
{
"name": "portfolio",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"sass": "node-sass -w scss/ -o dist/css --recursive"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"node-sass": "^4.12.0"
}
}
5. npm run sass (run the file of sass project)
7. ctrl + s (sass will complile)
8. npm cache clean --force (When error will be occured)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment