shadow-cljs.edn 4.1 KB

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