How to Compile SCSS or SASS to CSS

Require Installation:

  • Make sure that you have installed npm. what is npm ? npm is the world’s largest software registry. Open source developers from every continent use npm to share and borrow packages, and many organizations use npm to manage private development as well.

Get start with HTML proejct:

  1. create a folder project in your directory
  2. open the folder with Visaul studio Code (Recommend)
  3. open new terminal or Ctrl + `
  4. run command
  5. to install npm $ npm install
  6. then run npm install -g sass
  7. to install SASS $ npm install -g sass
  8. then create new asset folder in project folder directory
  9. create file namefile.scss
  10. then create stylename.css
  11. and to start Compile the SCSS or SASS with command
  12. to compile SASS to CSS $ sass --watch asset/namefile.scss:asset/stylename.css

after done you will see /*# sourceMappingURL=style.css.map */ on your stylename.css file and stylename.css.map in the same folder.

បង្ហាញមតិយោបល់

អត្ថបទមុន អត្ថបទបន្ទាប់