File tree Expand file tree Collapse file tree
src/main/clojure/cljs/repl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 278278; ; =============================================================================
279279; ; BrowserEnv
280280
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}]
282282 (binding [browser-state (:browser-state repl-env)
283283 ordering (:ordering repl-env)
284284 es (:es repl-env)
303303 (println " Serving HTTP on" (:host repl-env) " port" (:port repl-env))
304304 (println " Listening for browser REPL connect ..." ))
305305 (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))))))
307308
308309(defrecord BrowserEnv []
309310 repl /IJavaScriptEnv
355356 (merge (BrowserEnv. )
356357 {:host host
357358 :port port
359+ :launch-browser true
358360 :working-dir (->> [" .repl" (util/clojurescript-version )]
359361 (remove empty?) (string/join " -" ))
360362 :serve-static true
378380 Options:
379381
380382 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.
381385 working-dir: The directory where the compiled REPL client JavaScript will
382386 be stored. Defaults to \" .repl\" with a ClojureScript version
383387 suffix, eg. \" .repl-0.0-2138\" .
You can’t perform that action at this time.
0 commit comments