Skip to content
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

Integrating with ClojureScript's auto #9

Open
JulianBirch opened this issue Feb 5, 2014 · 3 comments
Open

Integrating with ClojureScript's auto #9

JulianBirch opened this issue Feb 5, 2014 · 3 comments

Comments

@JulianBirch
Copy link

It's not exactly kioo's problem, but if you update a kioo template, the ClojureScript compiler doesn't recompile. Not sure if anything can be done about this (short of a modification to the ClojureScript compiler, which would require a lot of thought).

@sritchie
Copy link
Contributor

I've been using the browser repl for this and just recompiling when I change the code, and it's been working really well.

@jessesherlock
Copy link

I have a command line file watcher that watches my templates and runs touch src/cljs/foobar/components.cljs on every change, which triggers the recompile of the correct cljs file.

If you install the guard program (https://github.com/guard/guard) and guard-shell then a guard file with a section like this:

guard :shell do
    watch(/resources\/templates\/.*/) {
        `touch src/cljs/foobar/file-where-templates-are-defined.cljs`
    }
end

will do the trick, as would any other method of triggering shell commands on file changes.

While never having worked in the ruby ecosystem I'm a big fan of guard especially because of guard-livereload, I have a few other lines that don't just recompile my js but reload my browser for me as well (or only reload the js/css/whatever instead of doing a full page reload) which I now can't live without.

@ghost
Copy link

ghost commented Sep 4, 2014

guard works great. One note, there are backticks around the touch command, not apostrophes. I missed that. Also if you have notifications in linux you can send one with the n command.

guard :shell do
  watch /resources\/public\/html\/.*/ do |m| 
    n m[0], 'Changed', :success
    `touch src/cljs/foo/bar.cljs`
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants