File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/clojure/cljs/repl Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 278
278
; ; =============================================================================
279
279
; ; BrowserEnv
280
280
281
- (defn setup [{:keys [working-dir] :as repl-env} {:keys [output-dir] :as opts}]
281
+ (defn setup [{:keys [working-dir launch-browser ] :as repl-env} {:keys [output-dir] :as opts}]
282
282
(binding [browser-state (:browser-state repl-env)
283
283
ordering (:ordering repl-env)
284
284
es (:es repl-env)
303
303
(println " Serving HTTP on" (:host repl-env) " port" (:port repl-env))
304
304
(println " Listening for browser REPL connect ..." ))
305
305
(server/start repl-env)
306
- (browse/browse-url (str " http://" (:host repl-env) " :" (:port repl-env)))))
306
+ (when launch-browser
307
+ (browse/browse-url (str " http://" (:host repl-env) " :" (:port repl-env))))))
307
308
308
309
(defrecord BrowserEnv []
309
310
repl /IJavaScriptEnv
355
356
(merge (BrowserEnv. )
356
357
{:host host
357
358
:port port
359
+ :launch-browser true
358
360
:working-dir (->> [" .repl" (util/clojurescript-version )]
359
361
(remove empty?) (string/join " -" ))
360
362
:serve-static true
378
380
Options:
379
381
380
382
port: The port on which the REPL server will run. Defaults to 9000.
383
+ launch-browser: A Boolean indicating whether a browser should be automatically
384
+ launched connecting back to the terminal REPL. Defaults to true.
381
385
working-dir: The directory where the compiled REPL client JavaScript will
382
386
be stored. Defaults to \" .repl\" with a ClojureScript version
383
387
suffix, eg. \" .repl-0.0-2138\" .
You can’t perform that action at this time.
0 commit comments