Closed borkdude closed 9 years ago
I suppose it's not yet on clojars.
Oh didn't expect this to be used yet. :) I'm basing this on the chestnut template, so I got the initial code checked in, but don't have it quite working yet. I plan to hold off on pushing this to clojars until there's a reagent release from the org. If you don't mind helping troubleshoot the template though I would appreciate the help with it. :)
@yogthos I was just going to suggest that Reagent needs something like Chestnut! Awesome!!!
Ahh I ran into this as well. Whoops. Maybe mention this in the readme? lol
@jakecraige ah good call, really didn't expect people to be looking at it so soon :)
@yogthos I was going to use https://github.com/gadfly361/reagent-seed but this project seemed simpler for me to start with. I'm so new and don't understand anything yet, lol.
Instructions on how to use this until it's released would also be good :) thanks
@jakecraige @borkdude forgot to mention, luminus provides a decent reagent setup when you use +cljs flag. It doesn't setup figwheel or austin, but it does have a cljs-build config for dev/prod and a small template app.
Just FYI, I'm am using my own template modelled more or less after Chesnut for creating Reagent + Liberator projects: https://github.com/borkdude/lein-new-liberagent for now, but I'm following this template with interest :)
I have somewhat mixed feelings about liberator myself. I'm more inclined to include compojure-api instead.
template should be building correctly now, I haven't had a chance to test the cljs repl though
@yogthos Does figwheel work for you in the current version? Like when you change something does the browser update? I'm having to refresh mine
I haven't got around to playing with it yet, it should work the same as the chestnut tempalte in theory
@yogthos Yeah that's what I was thinking. I'm sitting here comparing them and I don't see much of a difference except that it's not reloading for me :/ I'll keep playing with it I suppose.
Currently my process for running the server is
lein ring server
lein repl
(start-figwheel)
Then I go and I can view it. I make changes and it says it's sending changes in the repl but I have to hard refresh to see them
that seems like it should work, let me know if you make headway on it
@yogthos I wonder if this part has anything to do with it https://github.com/plexus/chestnut/blob/master/src/leiningen/new/chestnut/src/clj/chestnut/server.clj#L21
lein-ring should be handling reloads
@yogthos Looks like the stuff in env/dev/cljs
isn't being injected. When I manually add it into the core file it works
ah so I probably just need to load it in the html template then
does it work when you add
<script type="text/javascript">goog.require("myapp.dev");</script>
in resources/templates/index.html
?
Sec I'll try edit: @yogthos It can't find that namespace actually
hmm, found some typos in the env cljs, but for some reason dev doesn't seem to be loaded for me
oh nm I see I changed the name for the build config, sec
ok just pushed an update, looks to be working
@yogthos Won't that break for a prod build? Since you're still requiring .dev in the index.html?
only if the dev flag is set though :)
Ahh that's right
Sweet, live reload is working now.
Also, for anyone wanting to work with this while it's being developed. This is how you get it running locally.
git clone https://github.com/reagent-project/reagent-template.git
cd reagent-template
lein install
lein new reagent <app-name>
cd <app-name>
You can use ring to run the server. So in one terminal run lein ring server
and in the other start up a repl with lein repl
. Inside of there you can run (start-figwheel)
and (browser-repl)
to start those up. Go to http://localhost:3000 and enjoy
looks like lein ring uberjar
won't compile cljs correctly though. The cljs-build seems to be getting invoked since it says Compiling ClojureScript.
but doesn't actually produce a js file. :(
So best I've got right now is to explicitly set the profile for release, which doesn't seem too horrible:
lein with-profile release ring uberjar
IIRC you need to include :jar true in the cljsbuild configuration for it to actually get included.
ah yes looks like that did the trick! :)
also looks like the reagent group is taken on Cojars, so might have to rename the template to something, maybe reagent-site
or does anybody have better suggestions?
@yogthos What about just reagent-project
like the org name?
hmm apparently that already exists on Clojars https://clojars.org/reagent-project/lein-template so we might need a new group id...
I'm pretty sure @holmsand has the reagent
group. He should be able to add us to it.
that would be ideal, worst case we could reach out to the guy who own the reagent-project on Clojars (https://twitter.com/HansJSchmid) see if he might be willing to give it to us. :)
Yeah he does: https://clojars.org/groups/reagent, so we should probably use that. reagent/lein-template is nicer anyway.
agreed, less typing too :)
Ran into this issue as well. :-)
@holmsand any chance we could get @yogthos added to the reagent group on Clojars so he can publish this under reagent/lein-template?
Sure. Just tell me what I need to do to make that happen.
@holmsand If you hit https://clojars.org/groups/reagent while logged in, you should see an add member option. Anyone you add there will share control of the group and be able to push new projects. I'm also whoops
on Clojars and I'm pretty sure @yogthos is yogthos
. I don't know about @seancorfield.
Caveat: I'm pretty sure that gives us full control of the group, so hopefully your comfortable with that. If not we'll have to figure something else out.
Ok, that was easy. I've added yogthos and whoops to the reagent group.
Perfect thanks!
@holmsand @Whoops fantastic thanks, we should probably push out the current reagent from the org and then I'll update the template and reagent-forms to reference the current project.
Surprisingly, I’m seancorfield :)
On Oct 28, 2014, at 9:02 AM, Walton Hoops notifications@github.com wrote: I don't know about @seancorfield https://github.com/seancorfield.
@seancorfield You don't say... Welcome to the reagent group on clojars, then.
:+1:
Well then... I guess this issue can be closed.
Hi,
I also ran into this today when I was trying to play with reagent, but failed (lein version 2.9.6
):
$ lein new reagent-frontend play-reagent-frontent
Failed to resolve version for reagent-frontend:lein-template:jar:RELEASE: Could not find metadata reagent-frontend:lein-template/maven-metadata.xml in local (/home/whatacold/.m2/repository)
Failed to read artifact descriptor for reagent-frontend:lein-template:jar:RELEASE
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template reagent-frontend on the classpath.
But lein new reagent foo
works, what could be the problem?
Hi,
I'm not able to reproduce the issue locally. One thing to try might be to clear out ~/.m2/repository/reagent-frontend/lein-template
folder to see if there's a cached template causing an issue.
Borkdude@fina000 /tmp $ lein new reagent foo Failed to resolve version for reagent:lein-template:jar:RELEASE: Could not find metadata reagent:lein-template/maven-metadata.xml in local (/Users/Borkdude/.m2/repository) This could be due to a typo in :dependencies or network issues. If you are behind a proxy, try setting the 'http_proxy' environment variable. Could not find template reagent on the classpath.