-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All lein projects given names and figwheel-sidecar version increased …
…to "0.5.9". Two dev/server/user.clj files made to be able to work with Cursive stubs generation.
- Loading branch information
Chris Murphy
committed
Feb 22, 2017
1 parent
f16ac6b
commit b7c183d
Showing
18 changed files
with
74 additions
and
75 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
(ns clj.user | ||
(:require | ||
[clojure.set :as set] | ||
[clojure.tools.namespace.repl :refer [refresh]] | ||
[figwheel-sidecar.system :as fig] | ||
[com.stuartsierra.component :as component])) | ||
(:require | ||
[figwheel-sidecar.system :as fig] | ||
[com.stuartsierra.component :as component])) | ||
|
||
;;FIGWHEEL | ||
(def figwheel (atom nil)) | ||
|
||
(defn start-figwheel | ||
"Start Figwheel on the given builds, or defaults to build-ids in `figwheel-config`." | ||
([] | ||
(let [props (System/getProperties) | ||
figwheel-config (fig/fetch-config) | ||
all-builds (->> figwheel-config :data :all-builds (mapv :id))] | ||
(start-figwheel (keys (select-keys props all-builds))))) | ||
([build-ids] | ||
(let [figwheel-config (fig/fetch-config) | ||
default-build-ids (-> figwheel-config :data :build-ids) | ||
build-ids (if (empty? build-ids) default-build-ids build-ids) | ||
preferred-config (assoc-in figwheel-config [:data :build-ids] build-ids)] | ||
(reset! figwheel (component/system-map | ||
:figwheel-system (fig/figwheel-system preferred-config) | ||
:css-watcher (fig/css-watcher {:watch-paths ["resources/public/css"]}))) | ||
(println "STARTING FIGWHEEL ON BUILDS: " build-ids) | ||
(swap! figwheel component/start) | ||
(fig/cljs-repl (:figwheel-system @figwheel))))) | ||
"Start Figwheel on the given builds, or defaults to build-ids in `figwheel-config`." | ||
([] | ||
(let [props (System/getProperties) | ||
figwheel-config (fig/fetch-config) | ||
all-builds (->> figwheel-config :data :all-builds (mapv :id))] | ||
(start-figwheel (keys (select-keys props all-builds))))) | ||
([build-ids] | ||
(let [figwheel-config (fig/fetch-config) | ||
default-build-ids (-> figwheel-config :data :build-ids) | ||
build-ids (if (empty? build-ids) default-build-ids build-ids) | ||
preferred-config (assoc-in figwheel-config [:data :build-ids] build-ids)] | ||
(reset! figwheel (component/system-map | ||
:figwheel-system (fig/figwheel-system preferred-config) | ||
:css-watcher (fig/css-watcher {:watch-paths ["resources/public/css"]}))) | ||
(println "STARTING FIGWHEEL ON BUILDS: " build-ids) | ||
(swap! figwheel component/start) | ||
(fig/cljs-repl (:figwheel-system @figwheel))))) |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
(ns user | ||
(:require | ||
[clojure.pprint :refer (pprint)] | ||
[clojure.stacktrace :refer (print-stack-trace)] | ||
[clojure.tools.namespace.repl :refer [disable-reload! refresh clear set-refresh-dirs]] | ||
[figwheel-sidecar.repl-api :as ra] | ||
)) | ||
[figwheel-sidecar.system :as fig] | ||
[com.stuartsierra.component :as component])) | ||
|
||
;;FIGWHEEL | ||
|
||
(def figwheel-config | ||
{:figwheel-options {:css-dirs ["resources/public/css"]} | ||
:build-ids ["dev"] | ||
:all-builds (figwheel-sidecar.repl/get-project-cljs-builds)}) | ||
(def figwheel (atom nil)) | ||
|
||
(defn start-figwheel | ||
"Start Figwheel on the given builds, or defaults to build-ids in `figwheel-config`." | ||
([] | ||
(let [props (System/getProperties) | ||
all-builds (->> figwheel-config :all-builds (mapv :id))] | ||
figwheel-config (fig/fetch-config) | ||
all-builds (->> figwheel-config :data :all-builds (mapv :id))] | ||
(start-figwheel (keys (select-keys props all-builds))))) | ||
([build-ids] | ||
(let [default-build-ids (:build-ids figwheel-config) | ||
build-ids (if (empty? build-ids) default-build-ids build-ids)] | ||
(let [figwheel-config (fig/fetch-config) | ||
default-build-ids (-> figwheel-config :data :build-ids) | ||
build-ids (if (empty? build-ids) default-build-ids build-ids) | ||
preferred-config (assoc-in figwheel-config [:data :build-ids] build-ids)] | ||
(reset! figwheel (component/system-map | ||
:figwheel-system (fig/figwheel-system preferred-config) | ||
:css-watcher (fig/css-watcher {:watch-paths ["resources/public/css"]}))) | ||
(println "STARTING FIGWHEEL ON BUILDS: " build-ids) | ||
(ra/start-figwheel! (assoc figwheel-config :build-ids build-ids)) | ||
(ra/cljs-repl)))) | ||
(swap! figwheel component/start) | ||
(fig/cljs-repl (:figwheel-system @figwheel))))) | ||
|
||
|
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
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
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
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
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
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
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
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
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
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