Clojurescriptとは何をしますか?
-
12-11-2019 - |
質問
これは素晴らしいプロジェクトですが、どこから始めるのか?
私は自分のプロジェクトのために私自身のGithubフォークを作ることについて考えました。またはそれぞれのプロジェクトの分岐を作成する。
おそらく私はこの社会コーディングのものをまだ理解していません - しかし、私は本当に私が "カプセル化された"または "カプセル化"ソフトウェアフレームワークと開発環境を持っているアレルギーを感じています。
one.sample
アプリの隣に座って、ソースファイルの内側にプロジェクトを作成する必要がありますか?どこに始まるのかわからないディレクトリがたくさんあります。1つのプロジェクトのほとんどが私たちのために私たちのためにClojarsに座っているべきではありません。私たち自身のアプリテンプレート、lein noir new <appname>
のような少しのアプリテンプレートのようなものですか?
任意の洞察が高く評価されています、ありがとうございました!
解決
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.