Fix source paths.

This commit is contained in:
Richard Newman 2016-09-22 10:38:45 -07:00
parent 2e9a0f089c
commit 77fb997785
2 changed files with 31 additions and 6 deletions

View file

@ -88,6 +88,24 @@ brew install rlwrap
Run `lein cljsbuild auto advanced` to generate JavaScript into `target/`.
To build for a browser, into `release-browser`:
```
lein cljsbuild once release-browser
```
To build for node, into `release-node`:
```
lein cljsbuild once release-node
```
To package or install a JAR for node, modifying the source path appropriately (make sure you clean up swap or temp files in `src`!):
```
lein with-profile node jar
```
### Starting a ClojureScript REPL from the terminal
```

View file

@ -12,13 +12,19 @@
[jamesmacaulay/cljs-promises "0.1.0"]]
;; The browser will never require from the .JAR anyway.
:source-paths ["src/common" "src/node"]
:source-paths [
"src/common"
;; Can't be enabled by default: layers on top of cljsbuild!
;; Instead, add the :node profile:
;; lein with-profile node install
;"src/node"
]
:cljsbuild {:builds
{
:release-node
{
:source-paths ["src/node" "src/common"]
:source-paths ["src/node"]
:assert false
:compiler
{
@ -46,7 +52,7 @@
;; There's no point in generating a source map -- it'll be wrong
;; due to wrapping.
{
:source-paths ["src/browser" "src/common"]
:source-paths ["src/common" "src/browser"]
:assert false
:compiler
{
@ -67,7 +73,7 @@
:notify-command ["release-browser/wrap_bare.sh"]}
:advanced
{:source-paths ["src/node" "src/common"]
{:source-paths ["src/node"]
:compiler
{
:language-in :ecmascript5
@ -83,7 +89,7 @@
:test
{
:source-paths ["src/node" "src/common" "test"]
:source-paths ["src/node" "test"]
:compiler
{
:language-in :ecmascript5
@ -98,7 +104,8 @@
}}
}}
:profiles {:dev {:dependencies [[cljsbuild "1.1.3"]
:profiles {:node {:source-paths ["src/common" "src/node"]}
:dev {:dependencies [[cljsbuild "1.1.3"]
[tempfile "0.2.0"]
[com.cemerick/piggieback "0.2.1"]
[org.clojure/tools.nrepl "0.2.10"]