clojureworker icon indicating copy to clipboard operation
clojureworker copied to clipboard

add dependency on clojureflare to example worker

Open koeninger opened this issue 4 years ago • 5 comments

koeninger avatar Jul 07 '21 20:07 koeninger

This is a cool project, if you'd like some assistance making the example into a template that's usable from wrangler generate let me know. Basically would just require its own standalone repo. Could also use the new custom builds feature of wrangler so that it ran lein automatically as part of e.g. wrangler publish, see https://developers.cloudflare.com/workers/cli-wrangler/configuration#build

koeninger avatar Jul 07 '21 21:07 koeninger

Thanks @koeninger! Currently this acts as both an example but also as an end-to-end test (which is why I used :resource-paths ["../target/clojureflare-0.0.1.jar"] instead of declaring it in :dependencies), but I think keeping a fully working template would be pretty neat!

I can go ahead and create a separate repository for that, and will make sure to add your proposed change as well. Are there any other files/changes required?

sauercrowd avatar Jul 08 '21 23:07 sauercrowd

Sounds good.

I added a couple suggestions for the template to this PR. The {{ project-name }} will get filled in by wrangler generate. The [build] section changes let someone just run wrangler publish on a freshly generated template without needing to run lein first.

Let me know if you run into anything. Also dropped you an email about a possible blog post if it's easier to follow up there.

koeninger avatar Jul 09 '21 16:07 koeninger

Hey @koeninger,

I created a new repo to use as a template - should the template be as minimal as possible or give a bit more scaffolding that can then be then removed?

Currently it's the latter https://github.com/sauercrowd/clojureworker-wrangler/blob/master/src/my_worker/core.cljs, showing the features of the library.

Let me know what you think

sauercrowd avatar Aug 04 '21 21:08 sauercrowd

Having example usage makes sense to me

On Wed, Aug 4, 2021, 5:44 PM Jonas Otten @.***> wrote:

Hey @koeninger https://github.com/koeninger,

I created a new repo https://github.com/sauercrowd/clojureworker-wrangler to use as a template - should the template be as minimal as possible or give a bit more scaffolding that can then be then removed?

Currently it's the latter https://github.com/sauercrowd/clojureworker-wrangler/blob/master/src/my_worker/core.cljs, showing the features of the library.

Let me know what you think

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sauercrowd/clojureworker/pull/1#issuecomment-892994838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYAB6T6DSRQQELOMVXOVLT3GYCPANCNFSM477NBTKA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

koeninger avatar Aug 05 '21 13:08 koeninger