jstaffans / om-start-template

A lein template to create OM projects for nREPL compliant editors/IDEs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

om-start

A Leiningen template for creating OM projects compatible with an nREPL compliant editors/IDEs.

Quick start

Emacs/cider quick start

Start by creating a new OM project based on om-start lein-template.

lein new om-start om-tut

Then open the generated core.cljs file in Emacs from the src/cljs/om-tut directory and run the C-c M-j shortcut (or M-x cider-jack-in).

The command needs sometime to download dependencies and plugins, to compile the ClojureScript code and to run the nREPL server and client. So, be patient the very first time.

Once the nREPL is ready, evaluate the following Clojure forms:

(run) ; to run the included http server

and then

(browser-repl) ; to run the Browser Connected REPL

Finally, visit the http://localhost:3000 URL to activate the Browser Connected REPL.

You're now ready to follow the David Nolen Tutorial on OM with the same kind of live experience he reached with Light Table.

Evaluate core.cljs file form by form starting from the namespace declaration. To do that just position your cursor at the end of each form and type C-c C-e.

Eclipse/CCW quick start

Start CCW by Laurent Petit and create a new Clojure Project based on the om-start lein-template.

New > Clojure Project

Project Name: om-tut
Leiningen teamplate: om-start

From the contextual menu of the project select Run as > Clojure Application.

The command needs sometime to compile the ClojureScript code and to run the nREPL server and client. So, be patient.

Once the nREPL is ready, evaluate the (run) form to start the included http server.

Then start the Browser Connected REPL by evaluating the (browser-repl) form.

When ready, visit the http://localhost:3000 URL to activate the ClojureScript REPL and you are ready to follow the David Nolen Tutorial on OM.

Open the core.cljs source code in the editor and evaluate it form by form starting from the namespace declaration.

IntelliJ IDEA/Cursive quick start

Requires the Cursive plugin for IntelliJ IDEA.

Start by creating a new project based on the om-start Leiningen template. Use the command line.

lein new om-start om-tut

This project can then be opened in IntelliJ IDEA. There is however a bug in lein-cljsbuild which prevents Cursive from launching a REPL the normal way, from inside the IDE. As a workaround, the REPL can be launched from the command line.

lein repl :headless :port 4242

After this, you can connect to the nREPL running on localhost:4242 using a "remote REPL" run configuration. Start the server by evaluating the (run) form and then start the Browser Connected REPL by evaluating the (browser-repl) form.

When ready, visit the http://localhost:3000 URL to activate the ClojureScript REPL and you are ready to follow the David Nolen Tutorial on OM.

Open the core.cljs source code in the editor and evaluate it form by form starting from the namespace declaration.

Vim/fireplace quick start

Requires vim-fireplace.

Start by creating a new OM project based on om-start lein-template and launching the repl.

lein new om-start om-tut
cd om-tut
lein repl

lein repl will require some time to download dependencies and compile the ClojureScript code. Once the nREPL is ready, evaluate the following Clojure forms:

(run) ; to run the included http server server.

Then open the generated core.cljs file in Vim from the src/cljs/om-tut directory and enter the command

:Piggieback (browser-repl-env)

Finally, visit the http://localhost:3000 URL to activate the Browser Connected REPL.

You're now ready to follow the David Nolen Tutorial on OM with the same kind of live experience he reached with Light Table.

Evaluate core.cljs file form by form starting from the namespace declaration. To do that just position your cursor at the end of each top-level form and type cpp.

ATTENTION NOTE: om-start does not use :none optimization and this is because austin does not support it.

License

Copyright © 2014 Mimmo Cosenza (aka @magomimmo)

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

A lein template to create OM projects for nREPL compliant editors/IDEs

License:Eclipse Public License 1.0


Languages

Language:Clojure 100.0%