Last active
July 11, 2017 22:16
-
-
Save iku000888/4ee170efd5de2d0228d5fdd2970e95cc to your computer and use it in GitHub Desktop.
figwheel-sidecar ref: http://qiita.com/iku000888/items/08bfa405b1ed991a0e17
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
(require '[figwheel-sidecar.system :as sys]) | |
(require '[com.stuartsierra.component :as c]) | |
;;fetch-configはfigwheel.ednファイル,もしくはproject.cljの :cljsbuild と :figwheel の内容からfigwheelの設定値を作って返す | |
(def config (sys/fetch-config)) | |
;;figwheelのStuart Sierraシステム(必要なコンポーネントの依存関係の定義)をvarに束縛する | |
;;https://github.com/stuartsierra/component | |
(def system | |
(c/system-map | |
:figwheel-system | |
(sys/figwheel-system config))) | |
;;varに束縛されているオブジェクトにc/start関数を適用して起動する | |
(alter-var-root #'system c/start) | |
;Figwheel: Starting server at http://0.0.0.0:3449 | |
;Figwheel: Watching build - example | |
;Figwheel: Cleaning build - example | |
;Compiling "out/fiddles.js" from ["src"]... | |
;Successfully compiled "out/fiddles.js" in 4.024 seconds. | |
;;varに束縛されているオブジェクトにc/stop関数を適用して停止する | |
(alter-var-root #'system c/stop) | |
;Figwheel: Stopped watching build - example | |
;Figwheel: Stopping Websocket Server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment