Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Lonchampt Yeah there's a few issues with code quality. I posted screenshot as soon as it was functional, went back and cleaned up later
-
Also... 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) -
@010001111
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!
Related Rants
Bit of a bitch to get set up, but I made a SASS auto-recompiler with file watching. Windows was being a total ASS and sends the change event up to 4 times in my testing for a single file save action. It also renders the file unwritable for that time, throwing errors.
I literally had to add debouncing to make this work, but it's kinda nice now.
rant
sass
nodejs