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

Figwheel integration #53

Open
shaunlebron opened this issue Jan 15, 2015 · 11 comments
Open

Figwheel integration #53

shaunlebron opened this issue Jan 15, 2015 · 11 comments

Comments

@shaunlebron
Copy link
Collaborator

Figwheel is a big deal in cljs right now, which hot-loads compiled code into the running app when files change. I don't think it would be difficult to add a button to start figwheel. Figwheel already broadcasts warnings (and errors?) to the browser window, so I think having this as an option would complement the tool well.

To simplify integration, we could blank out the build statuses in the UI while fighweel is running. Something like "see figwheel window in your running app for build results"

@CASandmann
Copy link
Collaborator

I the app should probably only come with necessary features by default. People probably don't want to download more stuff than they have to (especially since we already require multiple dependencies). Maybe the installer could have an optional checkbox to include this functionality? Or maybe it could be accessible as a "plugin" downloadable from somewhere?

@shaunlebron
Copy link
Collaborator Author

Figwheel is just a lein dependency downloaded automatically for projects that include it in project.clj. So there won't be any extra download incurred if we want to support it. Meaning, I'm only proposing to show a button that will launch lein figwheel command if it is detected in the project.clj. Good points about maintaining a minimal set of features though.

People I talked to at the conj were using it, and I think its workflow is what developers are wanting to move towards. It is the LiveReload of cljs, and is especially useful for Om apps. I think that's worth adding a button.

@atroche
Copy link

atroche commented Feb 24, 2015

This is the only thing stopping me from using Cuttle right now =)

@comamitc comamitc self-assigned this Feb 25, 2015
@comamitc
Copy link
Collaborator

I should be able to knock this out.

@atroche
Copy link

atroche commented Feb 26, 2015

godspeed!

@shaunlebron
Copy link
Collaborator Author

There are some design decisions to make here. Some ideas:

  • Detect if figwheel is configured in project.clj
  • If it is, add a secondary button by the compile button that either reads "switch to figwheel" or "switch to cljsbuild". This changes the function of the compile/stop button to be more of a launch/stop button, while maintaining the drop-down for selecting a build target.
  • Launch figwheel when clicking "launch" button:
    • Launch a terminal window so we can interact with the REPL
    • Launch default web browser at figwheel endpoint
  • Kill figwheel instance when clicking the "stop" button.

@CASandmann
Copy link
Collaborator

Nice ideas Shaun, though I think it would look and feel better if we could interact with the REPL directly through Cuttle (all cljs-related stuff in one place rather than windows all over the place). I guess it probably wouldn't be worth it if Atom/Node doesn't already have some kind of text interaction pane... there's gotta be one of those, right?

@comamitc
Copy link
Collaborator

comamitc commented Mar 4, 2015

Would be easy if we could find some way to pipe stdin/stdout to the console... as a first step. I'm gonna remove myself from this one until we have some consensus around implementation.

@comamitc comamitc removed their assignment Mar 4, 2015
@ivanreese
Copy link

+1 I would love to see these two projects come together.

@madbonkey
Copy link

madbonkey commented Feb 26, 2017

@shaunlebron Regarding the design decisions above:

  • launching a default web browser on start is what for example create-react-app does (iirc) – personally, I find it to be somewhat annoying most of the time
  • having a REPL in Cuttle would be cool, but as we all spend probably too much time fiddling with our terminals already, I don't really want to have another one to configure/get accustomed to. Maybe an option for external terminal/"inline"?

Just my two cents ✌️

Edit: Just saw that all the comments are from 2015 – if this is not an active project any more, ignore my comment ;)

@shaunlebron
Copy link
Collaborator Author

@madbonkey cljs/tool is my latest attempt at a compiler tool that will be a lot easier to maintain than Cuttle. The cljs figwheel command works well. Still early stuff.

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

No branches or pull requests

6 participants