Created
April 11, 2016 11:56
-
-
Save samroberton/98e3050d63ee551180a90acf432e2a0c to your computer and use it in GitHub Desktop.
My build.boot's dev task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(deftask dev | |
"Build and run development mode." | |
[i ios bool "Flag to enable iOS builds."] | |
(comp | |
(environ/environ :env {}) | |
(watch) | |
(server-with-repl :port 7888) | |
(css) | |
(reload :ids #{"public/js/student"} | |
:only-by-re [#"^public/(?!js).*" #"^public/js/student\.out/.*"] | |
:asset-path "public" | |
:on-jsload 'nanny.web-client.utils/boot-reload) | |
(reload :ids #{"public/js/teacher"} | |
:only-by-re [#"^public/(?!js).*" #"^public/js/teacher\.out/.*"] | |
:asset-path "public" | |
:on-jsload 'nanny.web-client.utils/boot-reload) | |
(reload :ids #{"public/js/devcards"} | |
:only-by-re [#"^public/(?!js).*" #"^public/js/devcards\.out/.*"] | |
:asset-path "public" | |
:on-jsload 'nanny.web-client.utils/boot-reload) | |
(if ios | |
(reload :ids #{"public/js/react-native"} | |
;; Note that the iOS simulator errors with localhost. | |
:ws-host "192.168.1.100" | |
:only-by-re [#"^public/js/react-native\.out/node_modules/.*\.(cljs|js|map)$"] | |
:asset-path "public/js/react-native.out/node_modules" | |
;; Note that boot-react-native's reloading.js only attempts to reload | |
;; URLs starting with the exact string "/node_modules", and that | |
;; leaving "node_modules" off the end of `:asset-path` and leaving | |
;; this blank will mean we end up with "node_modules" instead. | |
:cljs-asset-path "/node_modules" | |
:on-jsload 'nanny.react-native.main/reloaded!) | |
identity) | |
(cljs-repl :ws-host "localhost" | |
;; FIXME -- not listening to this | |
:port 7999) | |
(if ios | |
(rn/before-cljsbuild :id "public/js/react-native") | |
identity) | |
(cljs :optimizations :none :ids cljs-ids) | |
(if ios | |
(rn/after-cljsbuild :app-dir "react-native" | |
:output-dir "public/js/react-native.out" | |
:server-url "localhost:8081" | |
:asset-path "/") | |
identity) | |
(if ios | |
(rn/print-ios-log) | |
identity))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment