Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Lonchampt447dShouldn't the "500" in the condition be replaced by DEBOUNCE_TIME ?
Ranchonyx560747dI mean, he's got a Point.
010001111259546dYou know.. one man doesn’t just write a file watcher...
010001111259546dAlso... I have to ask... why?
AFAIK sass Cli comes with an watcher, and we have sooooo many build tools which really do work great
(Like roll up, but that’s my taste now)
This program does two things:
1). Recursively discovers .scss files
2). Renders them to the proper location in the project
I have a sass folder in the root of my project. The structure mirrors the css folder in the static resources web folder.
For example, I have /sass/anonymous/index.scss, which renders to /static/style/anonymous/index.css
The script does all of this without any arguments. So I just open up a terminal session and type node sass and it renders everything and then starts watching for changes.
I don't need to specify which sass files to render, where they go, etc. It ignores partials automatically, and just knows where they go by instinct. If I add a sass file, no problemo.
And of course, reason 3: it was fun!