logseq/shadow-cljs.edn

109 lines
5.5 KiB
Plaintext

;; shadow-cljs configuration
{:deps true
:nrepl {:port 8701}
;; "." for /static
:dev-http {3001 ["static" "."]
3002 ["public/workspaces" "."]}
:builds
{:app {:target :browser
:module-loader true
:js-options {:ignore-asset-requires true} ;; handle `require(xxx.css)`
:modules {:main
{:init-fn frontend.core/init}
:code-editor
{:entries [frontend.extensions.code]
:depends-on #{:main}}
:age-encryption
{:entries [frontend.extensions.age-encryption]
:depends-on #{:main}}
:excalidraw
{:entries [frontend.extensions.excalidraw]
:depends-on #{:main}}}
:output-dir "./static/js"
:asset-path "/static/js"
:release {:asset-path "https://asset.logseq.com/static/js"}
:compiler-options {:infer-externs :auto
:output-feature-set :es-next-in
:source-map true
:externs ["datascript/externs.js"
"externs.js"]
:warnings {:fn-deprecated false
:redef false}}
:closure-defines {goog.debug.LOGGING_ENABLED true}
;; NOTE: electron, browser/mobile-app use different asset-paths.
;; For browser/mobile-app devs, assets are located in /static/js(via HTTP root).
;; For electron devs, assets are located in ./js(via relative path).
; :dev {:asset-path "./js"}
:devtools {:before-load frontend.core/stop ;; before live-reloading any code call this function
:after-load frontend.core/start ;; after live-reloading finishes call this function
:watch-path "/static"
:preloads [devtools.preload
shadow.remote.runtime.cljs.browser]}}
:electron {:target :node-script
:output-to "static/electron.js"
:main electron.core/main
:devtools {:before-load electron.core/stop
:after-load electron.core/start}
:compiler-options {:infer-externs :auto
:source-map true
:source-map-include-sources-content true
:source-map-detail-level :all
:externs ["datascript/externs.js"
"externs.js"]
:warnings {:fn-deprecated false
:redef false}}}
:test {:target :node-test
:output-to "static/tests.js"
:closure-defines {frontend.util/NODETEST true}
:devtools {:enabled false}
;; disable :static-fns to allow for with-redefs and repl development
:compiler-options {:static-fns false}
:main frontend.test.node-test-runner/main}
:publishing {:target :browser
:module-loader true
:js-options {:ignore-asset-requires true}
:modules {:main
{:init-fn frontend.publishing/init}
:code-editor
{:entries [frontend.extensions.code]
:depends-on #{:main}}
:age-encryption
{:entries [frontend.extensions.age-encryption]
:depends-on #{:main}}
:excalidraw
{:entries [frontend.extensions.excalidraw]
:depends-on #{:main}}}
:output-dir "./static/js/publishing"
:asset-path "static/js"
:closure-defines {frontend.config/PUBLISHING true
goog.debug.LOGGING_ENABLED true}
:compiler-options {:infer-externs :auto
:output-feature-set :es-next
:externs ["datascript/externs.js"
"externs.js"]
:warnings {:fn-deprecated false
:redef false}}
:devtools {:before-load frontend.core/stop
:after-load frontend.core/start
:preloads [devtools.preload]}}
:cards {:target nubank.workspaces.shadow-cljs.target
:ns-regexp "(test|cards)$"
:output-dir "./public/workspaces/static/js/workspaces"
:asset-path "/static/js/workspaces"
:preloads [] ;; optional, list namespaces to be pre loaded
:devtools {:after-load nubank.workspaces.core/after-load
:loader-mode :eval
:watch-path "/static"
:watch-dir "static"
:preloads [devtools.preload
shadow.remote.runtime.cljs.browser]}
:modules {:main {:entries [workspaces.main]}}}}}