mirror of
https://github.com/logseq/logseq.git
synced 2026-02-01 22:47:36 +00:00
refactor(dev): use global dev-http in shadow-cljs
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
-/.cpcache
|
||||
-/.shadow-cljs/
|
||||
-/resources/static/js/cljs-runtime/
|
||||
-/resources/static/js/common.js
|
||||
-/resources/static/js/main.js
|
||||
-/resources/static/js/sentry.min.js
|
||||
-/resources/static/js/highlight.min.js
|
||||
|
||||
2
deps.edn
2
deps.edn
@@ -1,4 +1,4 @@
|
||||
{:paths ["src/main" "src/workspaces" "templates"]
|
||||
{:paths ["src/main" "src/electron" "src/workspaces" "templates"]
|
||||
:deps
|
||||
{org.clojure/clojure {:mvn/version "1.10.0"}
|
||||
cheshire/cheshire {:mvn/version "5.10.0"}
|
||||
|
||||
@@ -51,11 +51,10 @@ const portal = new MagicPortal(worker);
|
||||
<script defer src="/static/js/highlight.min.js"></script>
|
||||
<script defer src="/static/js/interact.min.js"></script>
|
||||
<script defer src="/static/js/lsplugin.core.js"></script>
|
||||
<script defer src="/static/js/common.js"></script>
|
||||
<script defer src="/static/js/main.js"></script>
|
||||
<script defer src="/static/js/code-editor.js"></script>
|
||||
<script defer src="/static/js/age-encryption.js"></script>
|
||||
<script defer src="/static/js/excalidraw.js"></script>
|
||||
<script defer src="/static/js/main.js"></script>
|
||||
<script>
|
||||
/*!
|
||||
* swiped-events.js - v1.1.6
|
||||
|
||||
@@ -55,10 +55,9 @@ const portal = new MagicPortal(worker);
|
||||
<script defer src="./js/highlight.min.js"></script>
|
||||
<script defer src="./js/interact.min.js"></script>
|
||||
<script defer src="./js/lsplugin.core.js"></script>
|
||||
<script defer src="./js/common.js"></script>
|
||||
<script defer src="./js/main.js"></script>
|
||||
<script defer src="./js/code-editor.js"></script>
|
||||
<script defer src="./js/age-encryption.js"></script>
|
||||
<script defer src="./js/excalidraw.js"></script>
|
||||
<script defer src="./js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -54,10 +54,9 @@ const portal = new MagicPortal(worker);
|
||||
<script defer src="./js/highlight.min.js"></script>
|
||||
<script defer src="./js/interact.min.js"></script>
|
||||
<script defer src="./js/lsplugin.core.js"></script>
|
||||
<script defer src="./js/common.js"></script>
|
||||
<script defer src="./js/main.js"></script>
|
||||
<script defer src="./js/code-editor.js"></script>
|
||||
<script defer src="./js/age-encryption.js"></script>
|
||||
<script defer src="./js/excalidraw.js"></script>
|
||||
<script defer src="./js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -2,27 +2,28 @@
|
||||
{:deps true
|
||||
:nrepl {:port 8701}
|
||||
|
||||
;; "." for /static
|
||||
:dev-http {3001 ["public" "."]
|
||||
3002 ["public/workspaces" "."]}
|
||||
|
||||
:builds
|
||||
{:app {:target :browser
|
||||
:module-loader true
|
||||
:js-options {:ignore-asset-requires true} ;; handle `require(xxx.css)`
|
||||
:modules {:common {:entries []}
|
||||
|
||||
:main
|
||||
{:init-fn frontend.core/init
|
||||
:depends-on #{:code-editor :age-encryption :excalidraw}}
|
||||
:modules {:main
|
||||
{:init-fn frontend.core/init}
|
||||
;; :graph
|
||||
;; {:entries [frontend.extensions.graph.force]
|
||||
;; :depends-on #{:common}}
|
||||
;; :depends-on #{:main}}
|
||||
:code-editor
|
||||
{:entries [frontend.extensions.code]
|
||||
:depends-on #{:common}}
|
||||
:depends-on #{:main}}
|
||||
:age-encryption
|
||||
{:entries [frontend.extensions.age-encryption]
|
||||
:depends-on #{:common}}
|
||||
:depends-on #{:main}}
|
||||
:excalidraw
|
||||
{:entries [frontend.extensions.excalidraw]
|
||||
:depends-on #{:common}}}
|
||||
:depends-on #{:main}}}
|
||||
:output-dir "./static/js"
|
||||
:asset-path "/static/js"
|
||||
:release {:asset-path "https://asset.logseq.com/static/js"}
|
||||
@@ -35,11 +36,11 @@
|
||||
:closure-defines {goog.debug.LOGGING_ENABLED true
|
||||
frontend.config/GITHUB_APP_NAME #shadow/env "GITHUB_APP2_NAME"}
|
||||
|
||||
: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
|
||||
:http-root "public"
|
||||
:http-port 3001
|
||||
:watch-path "static"
|
||||
:watch-path "/static"
|
||||
:watch-dir "static"
|
||||
:preloads [devtools.preload
|
||||
shadow.remote.runtime.cljs.browser]}}
|
||||
|
||||
@@ -63,7 +64,7 @@
|
||||
:compiler-options {:source-map false}
|
||||
:modules {:parser-worker {:entries [frontend.worker.parser]
|
||||
:web-worker true
|
||||
:prepend #shadow/env ["PATCH_PARSER_WORKER" :default ";;"]}}
|
||||
:prepend #shadow/env ["PATCH_PARSER_WORKER" :default ";;"]}}
|
||||
:release {:compiler-options {:infer-externs :auto}}}
|
||||
|
||||
:test {:target :node-test
|
||||
@@ -74,25 +75,22 @@
|
||||
:publishing {:target :browser
|
||||
:module-loader true
|
||||
:js-options {:ignore-asset-requires true}
|
||||
:modules {:common {:entries []}
|
||||
|
||||
:main
|
||||
{:init-fn frontend.publishing/init
|
||||
:depends-on #{:common}}
|
||||
:modules {:main
|
||||
{:init-fn frontend.publishing/init}
|
||||
;; :graph
|
||||
;; {:entries [frontend.extensions.graph.force]
|
||||
;; :depends-on #{:common}}
|
||||
;; :depends-on #{:main}}
|
||||
:code-editor
|
||||
{:entries [frontend.extensions.code]
|
||||
:depends-on #{:common}}
|
||||
:depends-on #{:main}}
|
||||
:age-encryption
|
||||
{:entries [frontend.extensions.age-encryption]
|
||||
:depends-on #{:common}}
|
||||
:depends-on #{:main}}
|
||||
:excalidraw
|
||||
{:entries [frontend.extensions.excalidraw]
|
||||
:depends-on #{:common}}}
|
||||
:output-dir "./static/js/publishing"
|
||||
:asset-path "static/js"
|
||||
: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
|
||||
@@ -111,9 +109,8 @@
|
||||
:preloads [] ;; optional, list namespaces to be pre loaded
|
||||
:devtools {:after-load nubank.workspaces.core/after-load
|
||||
:loader-mode :eval
|
||||
:http-root "public/workspaces"
|
||||
:http-port 3002
|
||||
:watch-path "static"
|
||||
:watch-path "/static"
|
||||
:watch-dir "static"
|
||||
:preloads [devtools.preload
|
||||
shadow.remote.runtime.cljs.browser]}
|
||||
:modules {:main {:entries [workspaces.main]}}}}}
|
||||
|
||||
Reference in New Issue
Block a user