Preface
Goal: Using comfortable CLI environment in Windows for Sass.
Table of Content
-
Preface: Table of Content
-
1: Windows: Setting up CLI Environment
-
2: Sass: Install
-
3: Sass: Options
-
What is Next ?
1: Windows: Setting up CLI Environment
I have written the basic setup in separate article in my other blog. You should read this before you begin:
2: Sass: Install
Installing is pretty easy.
$ choco install sass
I’m using Sass that is built on top of dart. As alternative, you can use node-sass. But unfortunately, at the moment, I cannot find it in choco package list.
You might experience this issue as below, on first time running.
$ sass
'dart.exe' is not recognized as an internal or external command,
operable program or batch file.
Just close the terminal, and open sass in new terminal. Sass will be running just fine.
3: Sass: Options
Dart-sass options is a little bit different than the ruby-sass counterpart.
Example Sass
We need an example of Sass. any example is okay. You can use any.
$ git clone https://epsi-rns.gitlab.io/demo-hugo/
in Action
Now you can try Sass as usual, in windows cmder.
$ cd D:\cli\demo-hugo\themes\oriclone\
$ sass --watch -I sass sass/themes/oriclone:static/assets/css --style=compressed --no-source-map
Sass is watching for changes. Press Ctrl-C to stop.
For our comparation. Our ruby counterpart is using options as below
$ sass --watch -I sass sass/themes/oriclone:static/assets/css --style compressed --sourcemap=none
What is Next ?
There is other article, that you might need to read. Consider continue reading [ Windows - Chocolatey - Hugo ].
Thank you for reading.