I am trying to create a file in sass and link it notepad ++ i have tried looking at videos on how to install it and use sass but they all are on mac.
If you are a windows fan download Ruby Installer and install it locally.
Go to Start > All Programs > Ruby > Start Command Prompt with Ruby
Then install SASS using gem install sass
command.
You should now have installed sass, however you can check using sass -v
command.
Now using command prompt change the directory to your sass directory and use following commands
# Convert Sass to SCSS
sass-convert style.sass style.scss
# Convert SCSS to Sass
sass-convert style.scss style.sass
To run Sass from the command line, just use
sass input.scss output.css
You can also tell Sass to watch the file and update the CSS every time the Sass file changes:
sass --watch input.scss:output.css
If you have a directory with many Sass files, you can also tell Sass to watch the entire directory:
sass --watch app/sass:public/stylesheets
you can also use "Npp Exec" extension (F6), with easier way:
use this execute commands to compile xxx.scss, generate & open the new xxx.css file
npp_save
cmd /c "sass --update $(CURRENT_DIRECTORY)\$(NAME_PART).scss:$(CURRENT_DIRECTORY)\$(NAME_PART).css"
$(NPP_DIRECTORY)\notepad++.exe $(CURRENT_DIRECTORY)\$(NAME_PART).css
npp_console 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With