shadow-cljs.edn 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ;; shadow-cljs configuration
  2. {:deps true
  3. :nrepl {:port 8701}
  4. :builds
  5. {:app
  6. {:target :browser
  7. :module-loader true
  8. ;; handle `require(xxx.css)`
  9. :js-options {:ignore-asset-requires true}
  10. :modules {:main {:init-fn frontend.core/init}
  11. ;; :graph
  12. ;; {:entries [frontend.extensions.graph.force]
  13. ;; :depends-on #{:main}}
  14. :code-editor
  15. {:entries [frontend.extensions.code]
  16. :depends-on #{:main}}
  17. :age-encryption
  18. {:entries [frontend.extensions.age-encryption]
  19. :depends-on #{:main}}
  20. :excalidraw
  21. {:entries [frontend.extensions.excalidraw]
  22. :depends-on #{:main}}}
  23. :output-dir "./static/js"
  24. :asset-path "/static/js"
  25. :release {:asset-path "https://asset.logseq.com/static/js"}
  26. :compiler-options {:infer-externs :auto
  27. :output-feature-set :es-next-in
  28. :source-map true
  29. :source-map-include-sources-content true
  30. :source-map-detail-level :all
  31. :externs ["datascript/externs.js"
  32. "externs.js"]
  33. :warnings {:fn-deprecated false}}
  34. :closure-defines {goog.debug.LOGGING_ENABLED true
  35. frontend.config/GITHUB_APP_NAME #shadow/env "GITHUB_APP2_NAME"}
  36. :devtools
  37. ;; before live-reloading any code call this function
  38. {:before-load frontend.core/stop
  39. ;; after live-reloading finishes call this function
  40. :after-load frontend.core/start
  41. :http-root "public"
  42. :http-port 3001
  43. :watch-path "static"
  44. :preloads [devtools.preload
  45. shadow.remote.runtime.cljs.browser]}}
  46. :electron {:target :node-script
  47. :output-to "static/electron.js"
  48. :main electron.core/main
  49. :devtools
  50. {:before-load electron.core/stop
  51. :after-load electron.core/start}
  52. :compiler-options
  53. {:infer-externs :auto
  54. :source-map true
  55. :source-map-include-sources-content true
  56. :source-map-detail-level :all
  57. :externs ["datascript/externs.js"
  58. "externs.js"]
  59. :warnings {:fn-deprecated false}}}
  60. :test
  61. {:target :node-test
  62. :output-to "static/tests.js"
  63. :closure-defines {frontend.util/NODETEST true}
  64. :devtools {:enabled false}}
  65. :publishing
  66. {:target :browser
  67. :module-loader true
  68. :js-options {:ignore-asset-requires true}
  69. :modules {:main {:init-fn frontend.publishing/init}
  70. ;; :graph
  71. ;; {:entries [frontend.extensions.graph.force]
  72. ;; :depends-on #{:main}}
  73. :code-editor
  74. {:entries [frontend.extensions.code]
  75. :depends-on #{:main}}
  76. :age-encryption
  77. {:entries [frontend.extensions.age-encryption]
  78. :depends-on #{:main}}
  79. :excalidraw
  80. {:entries [frontend.extensions.excalidraw]
  81. :depends-on #{:main}}}
  82. :output-dir "./static/js/publishing"
  83. :asset-path "static/js"
  84. :closure-defines {frontend.config/PUBLISHING true
  85. goog.debug.LOGGING_ENABLED true}
  86. :compiler-options {:infer-externs :auto
  87. :output-feature-set :es-next
  88. :externs ["datascript/externs.js"
  89. "externs.js"]
  90. :warnings {:fn-deprecated false}}
  91. :devtools
  92. ;; before live-reloading any code call this function
  93. {:before-load frontend.core/stop
  94. ;; after live-reloading finishes call this function
  95. :after-load frontend.core/start
  96. :preloads [devtools.preload]}}
  97. :cards {:target nubank.workspaces.shadow-cljs.target
  98. :ns-regexp "(test|cards)$"
  99. :output-dir "./static/js/workspaces"
  100. :asset-path "/static/js/workspaces"
  101. :preloads [] ; optional, list namespaces to be pre loaded
  102. :devtools
  103. {
  104. :after-load nubank.workspaces.core/after-load
  105. :loader-mode :eval
  106. :http-root "public/workspaces"
  107. :http-port 9670
  108. :watch-path "static"
  109. :preloads [devtools.preload
  110. shadow.remote.runtime.cljs.browser]}
  111. :modules {:main {:entries [workspaces.main]}}}}}