duct-framework / duct

Server-side application framework for Clojure
MIT License
1.13k stars 51 forks source link

Improve clojurescript onboarding #13

Closed pschorf closed 9 years ago

pschorf commented 9 years ago

I recently started a new project using duct (my first time using clojurescript) and I was having a difficult time figuring out how to serve the generated js file until I changed system.clj to replace api-defaults with

(meta-merge site-defaults {:static {:resources "APPNAME/public"}})

Is it possible to generate that during the project setup? Or did I do it the wrong way?

weavejester commented 9 years ago

It already does add that into the base-config, but only if you use +site as well as +cljs.

Perhaps +cljs should imply +site? Or perhaps +cljs or +site add the static resources directory.

weavejester commented 9 years ago

I've decided to ensure that +cljs on its own adds the right resources path. It should work out of the box now, even if you miss out +site (though I'd still recommend both +cljs and +site for ClojureScript projects).

pschorf commented 9 years ago

Thanks!