Utility function for watching scss files and pushing updates
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 569
- Forks
- 72
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 5
Description
If someone has a Shiny application and wants to test out changes to a scss file with live changes, it would be useful to have a function that does something like this (I probably don't have all the details right, but this is the general idea):
r <- reactiveFileReader(500, session, "mytheme.scss", function(file) {
file
})
observe({
mytheme <- sass::sass_file(r())
# If we had a reactive getCurrentTheme(), that would be good here
theme <- bs_bundle(getCurrentTheme(), mytheme)
session$setCurrentTheme(theme)
})
In the case where someone uses a Bootswatch theme, this would be really helpful, since the real-time themer in bootstraplib doesn't work well with the way variables are used in Bootswatch.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the existing real-time themer in bootstraplib and the reactiveFileReader, sass::sass_file, bs_bundle, getCurrentTheme(), and session$setCurrentTheme() entry points mentioned in the issue. Determine how a watched SCSS file could trigger recompilation and theme updates for Bootswatch variables, then add coverage for the intended live-update behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, r, sass, scss
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100