-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto reload scss? #339
Comments
You could use lein-auto plugin to watch for changes and run |
Thanks @yogthos , I see the luminus template already included a config for lein auto. However it doesn't work as it stands now:
This doesn't work because the task to run to generate the css is |
Looking through the source in auto, it does look like it passes the args to the task here. Might be worth opening an issue to ask though. Another option could be to create an alias, something like:
There's also another plugin called lein-watch that has an example of this functionality in the example project. |
So I ended up making a few updates to lein-watch here, if you could try it to see whether it works for you that would be great: |
Here's the project setup I tested with: :plugins [[lein-cprop "1.0.3"]
[lein-immutant "2.1.0"]
[lein-sassc "0.10.4"]
[yogthos/lein-watch "0.0.4"]]
:sassc
[{:src "resources/scss/screen.scss"
:output-to "resources/public/css/screen.css"
:style "nested"
:import-path "resources/scss"}]
:watch
{:rate 150
:color :blue
:watchers {:sassc {:watch-dirs ["resources/scss"]
:file-patterns [#"\.(scss|sass)$"]
:tasks ["sassc once"]}}} |
Also as a note, I can't reproduce the lein auto problem locally. I ran:
then changed the file and saw lein auto run again in response:
|
@yogthos Using the I can reproduce the bug/behavior with lein auto just by creating a new luminus project and running lein auto :\ |
Thanks for the heads up, I might take a look at switching the template to use |
Using the +scss option (without cljs/figwheel) how can I auto reload the scss? Currently I have to run
lein sassc once
everytime I make a change.The text was updated successfully, but these errors were encountered: