Skip to content

Commit

Permalink
cljs-routes extension config
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Sep 10, 2023
1 parent c10617e commit 366db32
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 35 deletions.
7 changes: 4 additions & 3 deletions app/demo/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@
}

:docs ; RUN SERVICES (keep running)
{:extra-deps {org.pinkgorilla/goldly-docs {:mvn/version "0.4.614"}
{:extra-deps {org.pinkgorilla/goldly-docs {:mvn/version "0.4.616"}
com.fzakaria/slf4j-timbre {:mvn/version "0.4.0"}}
:extra-paths ["target/webly" ; to include the sci-bindings info
"node_modules"
"resources"]
:exec-fn modular.system/start!
:exec-args {:profile "jetty"
:services "services-docs.edn" ; "goldly/services.edn"
:config ["webly/config.edn" "goldly/config.edn" "goldly/docs-config.edn"
:services "services-docs.edn"
:config ["webly/config.edn" "goldly/config.edn"
;"goldly/docs-config.edn"
"ta-config.edn"]}}

; clj -T:tree2
Expand Down
11 changes: 8 additions & 3 deletions app/demo/src/demo/goldly/view/vega_nav.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
:value [2,2]}})

(defn vega-nav-plot [data]
^:R
[:div.w-full.h-full
[vegalite
{:box :fl ; :lg
:spec {;:width "1000"
:width "100%"
:height "100%"
:width "500" ;"100%"
:height "500" ;"100%"
:description "NAV Plot"
:data {:values data} ;data
:mark "line"
Expand All @@ -38,4 +39,8 @@
(def vega-nav-plot-test-data
[{:nav 100.0 :index 1}
{:nav 120.0 :index 2}
{:nav 150.0 :index 3}])
{:nav 150.0 :index 3}])

(vega-nav-plot vega-nav-plot-test-data)


52 changes: 32 additions & 20 deletions app/demo/src/ta-config.edn
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,10 @@

:goldly {:lazy true
:src-dir "src"
; runtime
; runtime
:autoload-cljs-dir ["demo/goldly/page"]
:routes {:app {"" :user/main
"test" :user/test
;warehouse
"warehouse" :user/warehouse
"series" :user/series
;backtest
"algo/backtest" :algo/backtest
"algo/tradingview" :tradingview/algo
; gann
"tradingview" :tradingview/udf
"gann" :gann
"joseph" :joseph/trades
; devtools
"devtools/pages" :pages
"devtools/help" :devtools
"devtools/scratchpad" :scratchpad
"devtools/viewer" :viewer
"devtools/environment" :environment
"devtools/theme" :theme}
"test" :user/test}
:api {"arrow" :dataset/arrow}}}

:reval {:rdocument {:storage-root "../../output/rdocument/"
Expand All @@ -47,8 +30,10 @@
:studies [:clj "notebook/studies/"]
:datascience [:clj "notebook/datascience/"]
:playground [:clj "notebook/playground/"]
:test [:cljs "demo/goldly/view/"]
;:demo [:clj "demo/notebook/"]
:test [:cljs "demo/goldly/view/"]}}
;:demo-cljs [:cljs "demo/notebook/"]
}}

:ta {:warehouse {:list "../resources/symbollist/"
:series {:crypto "../../output/db/crypto/"
Expand Down Expand Up @@ -76,5 +61,32 @@


:demo {:gann-data-file "../resources/gann.edn"}

:keybindings [{:kb "alt-g k",
:handler [:palette/show],
:desc "Keybindings dialog"}
{:kb "esc",
:handler [:modal/close],
:desc "Dialog Close"}
{:kb "alt-g t",
:handler [:reframe10x-toggle],
:desc "10x visibility toggle"}

;{:kb "up" :handler [:arrow-up] :desc "Codemirror Key Up"} ; :scope :codemirror
;{:kb "down" :handler [:arrow-down] :desc "Codemirror Key Down"} :scope :codemirror
{:kb "shift-enter" :handler [:codemirror-active/completion-apply] :desc "applies auto completion"}
{:kb "ctrl-space" :handler [:codemirror/completion-get] :desc "Show possible auto-completions"}
; {:spec "enter" :handler [:completion/clear] :key ::clear}
; {:spec "ctrl" :handler [:completion/show-all false] :scope :global :key ::show-all-hide}
{:kb "alt-g c" :handler [:clojuredocs] :desc "Look up the symbol under the cursor in ClojureDocs"}

; eval
{:kb "alt-shift-enter" :handler [:notebook/evaluate-all] :desc "Evaluate all segments."}
{:kb "ctrl-shift-enter" :handler [:notebook/evaluate-all] :desc "Evaluate all segments"}
{:kb "ctrl-enter" :handler [:repl/eval-expression] :desc "Evaluate the highlighted segment"}]

:scratchpad {:tap true}


;
}
2 changes: 2 additions & 0 deletions lib/gann/resources/ext/gann.edn
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
ta.gann.svg-plot/gann-svg-web
ta.gann.svg-plot/get-boxes]}

:cljs-routes {"gann" :gann}

}

1 change: 1 addition & 0 deletions lib/joseph/resources/ext/joseph.edn
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
joseph.trades/load-trades]}

:autoload-cljs-dir ["joseph/page"]
:cljs-routes {"joseph" :joseph/trades}
}

10 changes: 2 additions & 8 deletions lib/tradingview/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,15 @@

:goldly-docs
{:extra-paths ["resources"]
:extra-deps {org.pinkgorilla/goldly-docs {:mvn/version "0.4.610"}}
:extra-deps {org.pinkgorilla/goldly-docs {:mvn/version "0.4.615"}}
:exec-fn goldly.app/goldly-server-run!
:exec-args {:profile "jetty"
:config {:goldly {:lazy true
:src-dir "src"
; runtime
:autoload-cljs-dir ["src/goldly/page"]
:autoload-clj-ns [demo.env.config]
:routes {:app {;"" :pages
; devtools
"devtools/pages" :pages
"devtools/scratchpad" :scratchpad
"devtools/viewer" :viewer
"devtools/environment" :environment
"devtools/" :devtools}
:routes {:app {}
:api {}}}

:devtools {:rdocument {:storage-root "../../rdocument/"
Expand Down
3 changes: 3 additions & 0 deletions lib/tradingview/resources/ext/tradingview.edn
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@

:autoload-cljs-dir ["ta/tradingview/goldly/page"]

:cljs-routes {"algo/tradingview" :tradingview/algo
"tradingview" :tradingview/udf}


}
6 changes: 5 additions & 1 deletion lib/trateg/resources/ext/trateg.edn
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
ta.algo.manager/algo-shapes
; testing
ta.helper.date/now-datetime]}

:cljs-routes {;warehouse
"warehouse" :user/warehouse
"series" :user/series
;backtest
"algo/backtest" :algo/backtest}

}

0 comments on commit 366db32

Please sign in to comment.