Skip to content

Instantly share code, notes, and snippets.

@zmajstor zmajstor/watch.ps1
Created May 8, 2019

Embed
What would you like to do?
# https://4sysops.com/archives/monitor-file-changes-in-windows-with-powershell-and-pswatch
# install with:
# iex ((new-object net.webclient).DownloadString("http://bit.ly/Install-PsWatch"))
Import-Module pswatch
watch ".\scss" | ForEach-Object {
write-host "Change made on $($_.Path)"
$sassc = 'C:\sassctest\proba-npm\proba-npm\sassc.exe'
$params = 'scss/style.scss css/style.css'.split(" ")
& "$sassc" $params
Copy-Item ".\css\style.css" -Destination ".\out2"
}
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.