shadow-cljs.edn 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. :externs ["datascript/externs.js"
  31. "externs.js"]
  32. :warnings {:fn-deprecated false}}
  33. :closure-defines {goog.debug.LOGGING_ENABLED true
  34. frontend.config/GITHUB_APP_NAME #shadow/env "GITHUB_APP2_NAME"}
  35. :devtools
  36. ;; before live-reloading any code call this function
  37. {:before-load frontend.core/stop
  38. ;; after live-reloading finishes call this function
  39. :after-load frontend.core/start
  40. :http-root "public"
  41. :http-port 3001
  42. :watch-path "static"
  43. :preloads [devtools.preload
  44. shadow.remote.runtime.cljs.browser]}}
  45. :electron {:target :node-script
  46. :output-to "static/electron.js"
  47. :main electron.core/main
  48. :devtools
  49. {:before-load electron.core/stop
  50. :after-load electron.core/start}
  51. :compiler-options
  52. {:infer-externs :auto
  53. :source-map true
  54. :source-map-include-sources-content true
  55. :source-map-detail-level :all
  56. :externs ["datascript/externs.js"
  57. "externs.js"]
  58. :warnings {:fn-deprecated false}}}
  59. :parser-worker
  60. {:target :browser
  61. :output-dir "./static/js"
  62. :asset-path "./js"
  63. :compiler-options {:source-map false
  64. :source-map-include-sources-content false}
  65. :modules {:parser-worker {:entries [frontend.worker.parser]
  66. :web-worker true
  67. :prepend #shadow/env ["PATCH_PARSER_WORKER" :default ";;"]
  68. }}
  69. :release {:compiler-options {:infer-externs :auto}}}
  70. :test
  71. {:target :node-test
  72. :output-to "static/tests.js"
  73. :closure-defines {frontend.util/NODETEST true}
  74. :devtools {:enabled false}}
  75. :publishing
  76. {:target :browser
  77. :module-loader true
  78. :js-options {:ignore-asset-requires true}
  79. :modules {:main {:init-fn frontend.publishing/init}
  80. ;; :graph
  81. ;; {:entries [frontend.extensions.graph.force]
  82. ;; :depends-on #{:main}}
  83. :code-editor
  84. {:entries [frontend.extensions.code]
  85. :depends-on #{:main}}
  86. :age-encryption
  87. {:entries [frontend.extensions.age-encryption]
  88. :depends-on #{:main}}
  89. :excalidraw
  90. {:entries [frontend.extensions.excalidraw]
  91. :depends-on #{:main}}}
  92. :output-dir "./static/js/publishing"
  93. :asset-path "static/js"
  94. :closure-defines {frontend.config/PUBLISHING true
  95. goog.debug.LOGGING_ENABLED true}
  96. :compiler-options {:infer-externs :auto
  97. :output-feature-set :es-next
  98. :externs ["datascript/externs.js"
  99. "externs.js"]
  100. :warnings {:fn-deprecated false}}
  101. :devtools
  102. ;; before live-reloading any code call this function
  103. {:before-load frontend.core/stop
  104. ;; after live-reloading finishes call this function
  105. :after-load frontend.core/start
  106. :preloads [devtools.preload]}}
  107. :cards {:target nubank.workspaces.shadow-cljs.target
  108. :ns-regexp "(test|cards)$"
  109. :output-dir "./static/js/workspaces"
  110. :asset-path "/static/js/workspaces"
  111. :preloads [] ; optional, list namespaces to be pre loaded
  112. :devtools
  113. {
  114. :after-load nubank.workspaces.core/after-load
  115. :loader-mode :eval
  116. :http-root "public/workspaces"
  117. :http-port 3002
  118. :watch-path "static"
  119. :preloads [devtools.preload
  120. shadow.remote.runtime.cljs.browser]}
  121. :modules {:main {:entries [workspaces.main]}}}}}