Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit b41f113

Browse files
committed
Add docs for cljc eval and cljs compilation modes
1 parent 1f909a6 commit b41f113

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,24 @@ This plugin works for projects on recent versions of ClojureScript e.g. 1.7.X. F
1414

1515
Welcome first time ClojureScript users! Please see [David Nolen's tutorial](https://github.com/swannodette/lt-cljs-tutorial) to get familiar with ClojureScript and comfortable with LightTable's repl. Note while doing that tutorial you were in a namespace. A namespace is necessary for a LightTable repl. Once you have finished the tutorial, create your own ClojureScript project with `lein new mies my-project` and eval there. If you want to add dependencies to your project, read the [below section](#clojurescript-eval) as that requires a different type of LightTable connection.
1616

17+
## Cljc eval
18+
19+
By default, \*.cljc files are identified as Clojure files. Thus when you eval, it will eval as a
20+
Clojure file. If you'd like to eval as a ClojureScript file, run the command `Editor: Set current
21+
editor syntax`, select `ClojureScript` and then eval.
22+
1723
## ClojureScript Eval
1824

19-
There are 3 ways to eval ClojureScript, 2 of which use your ClojureScript javascript. To add one of these connections, run the command `Connect: Add Connection`. The 3 connections to choose from:
25+
There are 3 options to eval ClojureScript, 2 of which use your ClojureScript javascript. To add one of these connections, run the command `Connect: Add Connection`. The 3 connections to choose from:
2026

2127
1. `Light Table UI` - Connect to the LightTable js process. Great for a headless mode, writing plugins and to try out ClojureScript features. Note, you use the ClojureScript version that comes with LightTable.
2228

2329
2. `Browser` - Connect to a web page that has the compiled ClojureScript sourced e.g. `file:///path/to/index.html`. You must navigate the internal browser to that web page. Recommended for ease of use.
2430

2531
3. `Browser (External)` - Connect to a web page that has the compiled ClojureScript sourced e.g. `file:///path/to/index.html`. In addition to navigating the external browser, you must copy the script tag into that web page. Requires more setup than the internal browser but gives you the freedom to use any browser.
2632

33+
Note that for Browser options, compiled ClojureScript cannot be compiled with `:advanced` `:optimizations` mode.
34+
2735
## ClojureScript Workflows
2836

2937
For ClojureScript projects:

0 commit comments

Comments
 (0)