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

Commit

Permalink
Update script and instructions to account for two build targets
Browse files Browse the repository at this point in the history
  • Loading branch information
cldwalker committed Dec 16, 2015
1 parent 64d6d32 commit c73c3b6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/developer-install.md
Expand Up @@ -56,7 +56,7 @@ This will take a few minutes the first time as electron and plugins are download
To override the output directory, specify `$VERSION` e.g. `VERSION=0.8.1-pre script/build.sh`.

On subsequent builds, use `script/build-app.sh` for quicker builds that don't require updating plugins or electron.
If any ClojureScript files change, you must run `lein cljsbuild once`. On Windows, you may need to comment out the :source-map
If any ClojureScript files change, you must run `lein cljsbuild once app`. On Windows, you may need to comment out the :source-map
line before compiling ClojureScript to get around [issue 1025](https://github.com/LightTable/LightTable/issues/1025).

# Usage
Expand Down
9 changes: 9 additions & 0 deletions doc/for-committers.md
Expand Up @@ -45,6 +45,15 @@ be unused. Some tips to confirm how it is/was used:
* Do a LightTable user search for the given fn. For example, to see where [proc/exec is used](https://github.com/search?utf8=%E2%9C%93&q=proc%2Fexec+user%3ALightTable&type=Code&ref=searchresults)
* `git log -u -S WORD` will do a code history search for WORD

### Upgrading ClojureScript

When upgrading ClojureScript, cljsDeps.js needs to be rebuilt with `lein cljsbuild once cljsdeps`.
cljsDeps.js is used by
[threadworker.js](https://github.com/cldwalker/LightTable/blob/d79adff78557febf4a3b94691a132fa81fe3aeaa/deploy/core/node_modules/lighttable/background/threadworker.js#L29)
to run javascript in [a background
thread](https://github.com/cldwalker/LightTable/blob/d79adff78557febf4a3b94691a132fa81fe3aeaa/src/lt/objs/thread.cljs#L67).
This background thread is invoked with the `background` macro.

## Release process

This is our release checklist which can be dropped in to an issue:
Expand Down
7 changes: 6 additions & 1 deletion doc/workflow.md
Expand Up @@ -2,7 +2,12 @@

I'll assume you already know how to eval code (Cmd/Ctrl-enter), how to open the command bar (Ctrl-space) and how to open files with the navigator (Cmd/Ctrl-o). If you don't, start with the [Light Table tutorial](http://docs.lighttable.com/tutorials/full/).

Add `LightTable/src` to your Light Table workspace and open `src/lt/objs/jump_stack.cljs`. Hit eval (Cmd/Ctrl-enter) somewhere in the file to start a ClojureScript compiler. When it's finished starting up it will ask you where to send the emitted JavaScript code - choose Light Table UI from the menu. Now you should be able to eval ClojureScript code inside your current Light Table instance. Try something simple like `(js/alert "foo")` to make sure it works. Generally, we eval code as we write it and only compile with `lein cljsbuild once` if we need to restart Light Table.
Add `LightTable/src` to your Light Table workspace and open `src/lt/objs/jump_stack.cljs`. Hit eval
(Cmd/Ctrl-enter) somewhere in the file to start a ClojureScript compiler. When it's finished
starting up it will ask you where to send the emitted JavaScript code - choose Light Table UI from
the menu. Now you should be able to eval ClojureScript code inside your current Light Table
instance. Try something simple like `(js/alert "foo")` to make sure it works. Generally, we eval
code as we write it and only compile with `lein cljsbuild once app` if we need to restart Light Table.

The new Light Table release supports auto-complete (Tab), inline docs (Ctrl-d) and jump-to-definition (Ctrl-. to jump and Ctrl-, to jump back) for ClojureScript and Clojure vars, all of which are very useful for exploring the codebase. In ClojureScript these features are only aware of vars that have been eval'd in the current compiler process, so be sure to eval the ns form at the top of the file to get the full effect.

Expand Down
2 changes: 1 addition & 1 deletion script/build.sh
Expand Up @@ -31,7 +31,7 @@ popd
if [ "$(echo $(uname -s) | cut -c 1-9)" == "CYGWIN_NT" ]; then
sed -i 's/:source-map/;;:source-map/' project.clj
fi
lein cljsbuild clean && lein cljsbuild once
rm deploy/core/node_modules/lighttable/bootstrap.js && lein cljsbuild once app

# Fetch plugins
PLUGINS=("Clojure,0.2.0" "CSS,0.0.6" "HTML,0.1.0" "Javascript,0.1.3"
Expand Down

0 comments on commit c73c3b6

Please sign in to comment.