Skip to content

Instantly share code, notes, and snippets.

@zmajstor
Created May 8, 2019 15:14
Show Gist options
  • Save zmajstor/54b25b4c6a42ce96ca5eaf2813dca04b to your computer and use it in GitHub Desktop.
Save zmajstor/54b25b4c6a42ce96ca5eaf2813dca04b to your computer and use it in GitHub Desktop.
# 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