SASS Section 1 – Commands
- install SASS: sudo gem install sass
- check SASS version: sass -v
- convert file type between .scss and .sass:
- sass-convert example.scss exsample.sass
- sass-convert example.sass exsample.scss
- convert .sass to .css file:
- sass example.scss:example.css
- to synchronous update .css files from .scss file, using watch command
- sass –watch example.scss:example.css (so when you change .scss file content, the .css file content will be automatically updated)
- sass –watch folderWithScssFiles : folerWantToStoreConvertCssFilesFromFolderWithScssFiles
- using ctrl + c to stop watching (stop synchronous updating)
- in order to style exort .css file, using –style compact/compressed/expanded comand:
- sass example.scss:example.css –style compact
- sass example.scss:example.css –style compressed (lightest version)
- sass example.scss:example.css –style expanded
- stop generate css map file
- sass example.scss:example.css –style compact –sourcemap=none