shadow-cljs.edn 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. :modules {:parser-worker {:entries [frontend.worker.parser]
  63. :web-worker true}}
  64. :release {:compiler-options {:infer-externs :auto}}}
  65. :test
  66. {:target :node-test
  67. :output-to "static/tests.js"
  68. :closure-defines {frontend.util/NODETEST true}
  69. :devtools {:enabled false}}
  70. :publishing
  71. {:target :browser
  72. :module-loader true
  73. :js-options {:ignore-asset-requires true}
  74. :modules {:main {:init-fn frontend.publishing/init}
  75. ;; :graph
  76. ;; {:entries [frontend.extensions.graph.force]
  77. ;; :depends-on #{:main}}
  78. :code-editor
  79. {:entries [frontend.extensions.code]
  80. :depends-on #{:main}}
  81. :age-encryption
  82. {:entries [frontend.extensions.age-encryption]
  83. :depends-on #{:main}}
  84. :excalidraw
  85. {:entries [frontend.extensions.excalidraw]
  86. :depends-on #{:main}}}
  87. :output-dir "./static/js/publishing"
  88. :asset-path "static/js"
  89. :closure-defines {frontend.config/PUBLISHING true
  90. goog.debug.LOGGING_ENABLED true}
  91. :compiler-options {:infer-externs :auto
  92. :output-feature-set :es-next
  93. :externs ["datascript/externs.js"
  94. "externs.js"]
  95. :warnings {:fn-deprecated false}}
  96. :devtools
  97. ;; before live-reloading any code call this function
  98. {:before-load frontend.core/stop
  99. ;; after live-reloading finishes call this function
  100. :after-load frontend.core/start
  101. :preloads [devtools.preload]}}
  102. :cards {:target nubank.workspaces.shadow-cljs.target
  103. :ns-regexp "(test|cards)$"
  104. :output-dir "./static/js/workspaces"
  105. :asset-path "/static/js/workspaces"
  106. :preloads [] ; optional, list namespaces to be pre loaded
  107. :devtools
  108. {
  109. :after-load nubank.workspaces.core/after-load
  110. :loader-mode :eval
  111. :http-root "public/workspaces"
  112. :http-port 3002
  113. :watch-path "static"
  114. :preloads [devtools.preload
  115. shadow.remote.runtime.cljs.browser]}
  116. :modules {:main {:entries [workspaces.main]}}}}}