Skip to content

Instantly share code, notes, and snippets.

@craigiswayne

craigiswayne/setup.md

Last active Jul 28, 2020
Embed
What would you like to do?
How to Compile Sass \ Scss via NPM

How to Setup npm and scss \ sass

npm init
npm install node-sass --save
mkdir -p src/styles
touch src/styles/style.scss

In your generated package.json add the following to your scripts entry

"scripts": {
  "compile:sass": "node-sass src/styles -o dist/styles --source-comments=false --source-map=true --output-style=compressed --error-bell",
  "watch:sass": "npm run compile:sass -- --watch",  "watch": "npm run watch:sass"
}

Then to get up and running, just do the following in your command line \ terminal

npm run compile:sass
npm run watch:sass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.