What do I do with ClojureScript One?
-
12-11-2019 - |
문제
This is a wonderful project, but where to start?
I thought about making my own github fork for my own project. Or making a branch for each project "inside" of it.
Perhaps I do not really understand this social coding stuff yet -- but I am really feeling the allergy I have with "encapsulated" or "encapsulating" software frameworks and development environments.
Should one make a project inside of the source files, sitting next to the one.sample
app? There are so many directories I do not know where to begin. Shouldn't most of the One project be sitting in clojars for us to use and spit out our own app templates, a bit like lein noir new <appname>
?
Any and all insights appreciated, thank you!
해결책
In episode 3 of the Think Relevance podcast Brenton Ashworth says that at the moment there are three ways to take advantage of ClojureScript One (18min 38sec):
- Copy the ClojureScript One project into your own project
- Fork the ClojureScript One repo, delete the sample application, and build your own application inside the ClojureScript One project
- Look at how CloureSript One handles dependencies, and then use the same approach to setup ClojureScript One as a dependency of your own project.
Sounds like the project team are aware of this being awkward at the moment, and they hope to be able to come up with a better story for this in the future.
다른 팁
To be honest with you.... I've had a ridiculous amount of trouble with clojurescript one. There's just too much code to work with and its good for a reference but not when beginners to clojurescript are just starting out.
The best way to get started with clojurescript is with chris granger's https://github.com/ibdknox/cljs-template
start your project with:
lein new cljs-template <your project name>
cd <your project name>
lein run
That's it... just go into the src/client directory and start coding! basically, the template gives you a complete project that:
- serves pages through ring
- has cljs compilation on save so there is no need to muck around with lein cljsbuild
There is a 'clone' of clojurescript-one https://github.com/zcaudate/cljs-template-one made using cljs-template as a guide. It can be used as a project template:
lein new cljs-template-one <your project name>
cd <your project name>
chmod +x bootstrap.sh && ./bootstrap.sh
lein run
The project uses the twitter/bootstrap html template and can be viewed here: http://cljs-bootstrapped.herokuapp.com/
ClojureScript One have a great wiki pages: https://github.com/brentonashworth/one/wiki. They seem very helpful.