Fix source paths.
This commit is contained in:
parent
2e9a0f089c
commit
77fb997785
2 changed files with 31 additions and 6 deletions
18
README.md
18
README.md
|
@ -88,6 +88,24 @@ brew install rlwrap
|
||||||
|
|
||||||
Run `lein cljsbuild auto advanced` to generate JavaScript into `target/`.
|
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
|
### Starting a ClojureScript REPL from the terminal
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
19
project.clj
19
project.clj
|
@ -12,13 +12,19 @@
|
||||||
[jamesmacaulay/cljs-promises "0.1.0"]]
|
[jamesmacaulay/cljs-promises "0.1.0"]]
|
||||||
|
|
||||||
;; The browser will never require from the .JAR anyway.
|
;; 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
|
:cljsbuild {:builds
|
||||||
{
|
{
|
||||||
:release-node
|
:release-node
|
||||||
{
|
{
|
||||||
:source-paths ["src/node" "src/common"]
|
:source-paths ["src/node"]
|
||||||
:assert false
|
:assert false
|
||||||
:compiler
|
:compiler
|
||||||
{
|
{
|
||||||
|
@ -46,7 +52,7 @@
|
||||||
;; There's no point in generating a source map -- it'll be wrong
|
;; There's no point in generating a source map -- it'll be wrong
|
||||||
;; due to wrapping.
|
;; due to wrapping.
|
||||||
{
|
{
|
||||||
:source-paths ["src/browser" "src/common"]
|
:source-paths ["src/common" "src/browser"]
|
||||||
:assert false
|
:assert false
|
||||||
:compiler
|
:compiler
|
||||||
{
|
{
|
||||||
|
@ -67,7 +73,7 @@
|
||||||
:notify-command ["release-browser/wrap_bare.sh"]}
|
:notify-command ["release-browser/wrap_bare.sh"]}
|
||||||
|
|
||||||
:advanced
|
:advanced
|
||||||
{:source-paths ["src/node" "src/common"]
|
{:source-paths ["src/node"]
|
||||||
:compiler
|
:compiler
|
||||||
{
|
{
|
||||||
:language-in :ecmascript5
|
:language-in :ecmascript5
|
||||||
|
@ -83,7 +89,7 @@
|
||||||
|
|
||||||
:test
|
:test
|
||||||
{
|
{
|
||||||
:source-paths ["src/node" "src/common" "test"]
|
:source-paths ["src/node" "test"]
|
||||||
:compiler
|
:compiler
|
||||||
{
|
{
|
||||||
:language-in :ecmascript5
|
: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"]
|
[tempfile "0.2.0"]
|
||||||
[com.cemerick/piggieback "0.2.1"]
|
[com.cemerick/piggieback "0.2.1"]
|
||||||
[org.clojure/tools.nrepl "0.2.10"]
|
[org.clojure/tools.nrepl "0.2.10"]
|
||||||
|
|
Loading…
Reference in a new issue