mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
get rid of shared module
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
(ns ^:node-only logseq.publishing.export
|
||||
"This electron only ns (for the main process) exports files from multiple
|
||||
locations to provide a complete publishing app"
|
||||
(:require ["fs-extra" :as fse]
|
||||
(:require ["fs" :as fs]
|
||||
["fs-extra" :as fse]
|
||||
["path" :as node-path]
|
||||
["fs" :as fs]
|
||||
[promesa.core :as p]))
|
||||
|
||||
(def ^:api js-files
|
||||
"js files from publishing release build"
|
||||
(->> ["shared.js" "main.js" "code-editor.js" "excalidraw.js" "tldraw.js" "db-worker.js"]
|
||||
(->> ["main.js" "code-editor.js" "excalidraw.js" "tldraw.js" "db-worker.js"]
|
||||
;; Add source maps for all js files as it doesn't affect initial load time
|
||||
(mapcat #(vector % (str % ".map")))
|
||||
vec))
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
"This frontend only ns builds the publishing html including doing all the
|
||||
necessary db filtering"
|
||||
(:require [clojure.string :as string]
|
||||
[datascript.core :as d]
|
||||
[datascript.transit :as dt]
|
||||
[goog.string :as gstring]
|
||||
[goog.string.format]
|
||||
[datascript.transit :as dt]
|
||||
[datascript.core :as d]
|
||||
[logseq.publishing.db :as db]))
|
||||
|
||||
;; Copied from hiccup but tweaked for publish usage
|
||||
@@ -124,7 +124,6 @@ necessary db filtering"
|
||||
[:script {:src "static/js/react.production.min.js"}]
|
||||
[:script {:src "static/js/react-dom.production.min.js"}]
|
||||
[:script {:src "static/js/ui.js"}]
|
||||
[:script {:src "static/js/shared.js"}]
|
||||
[:script {:src "static/js/main.js"}]
|
||||
[:script {:src "static/js/interact.min.js"}]
|
||||
[:script {:src "static/js/highlight.min.js"}]
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
<script defer src="/static/js/react-dom.production.min.js"></script>
|
||||
<script defer src="/static/js/main-bundle.js"></script>
|
||||
<script defer src="/static/js/ui.js"></script>
|
||||
<script defer src="/static/js/shared.js"></script>
|
||||
<script defer src="/static/js/main.js"></script>
|
||||
<script defer src="/static/js/amplify.js"></script>
|
||||
<script defer src="/static/js/prop-types.min.js"></script>
|
||||
|
||||
@@ -56,7 +56,6 @@ const portal = new MagicPortal(worker);
|
||||
<script defer src="./js/react-dom.production.min.js"></script>
|
||||
<script defer src="./js/main-bundle.js"></script>
|
||||
<script defer src="./js/ui.js"></script>
|
||||
<script defer src="./js/shared.js"></script>
|
||||
<script defer src="./js/main.js"></script>
|
||||
<script defer src="./js/amplify.js"></script>
|
||||
<script defer src="./js/prop-types.min.js"></script>
|
||||
|
||||
@@ -21,11 +21,8 @@
|
||||
:global "React"}
|
||||
"react-dom" {:target :global
|
||||
:global "ReactDOM"}}} ;; handle `require(xxx.css)`
|
||||
:modules {:shared
|
||||
{:entries []}
|
||||
:main
|
||||
{:init-fn frontend.core/init
|
||||
:depends-on #{:shared}}
|
||||
:modules {:main
|
||||
{:init-fn frontend.core/init}
|
||||
:code-editor
|
||||
{:entries [frontend.extensions.code]
|
||||
:depends-on #{:main}}
|
||||
@@ -74,16 +71,12 @@
|
||||
:external-index-format :esm
|
||||
:entry-keys ["module" "browser" "main"]
|
||||
:export-conditions ["module" "import", "browser" "require" "default"]}
|
||||
:modules {:shared
|
||||
{:entries []}
|
||||
:db-worker
|
||||
:modules {:db-worker
|
||||
{:init-fn frontend.worker.db-worker/init
|
||||
:depends-on #{:shared}
|
||||
:web-worker true
|
||||
:prepend "importScripts('workers-bundle.js');\n"}
|
||||
:inference-worker
|
||||
{:init-fn frontend.inference-worker.inference-worker/init
|
||||
:depends-on #{:shared}
|
||||
:web-worker true
|
||||
:prepend "importScripts('workers-bundle.js');\n"}}
|
||||
|
||||
@@ -157,11 +150,8 @@
|
||||
:global "React"}
|
||||
"react-dom" {:target :global
|
||||
:global "ReactDOM"}}}
|
||||
:modules {:shared
|
||||
{:entries []}
|
||||
:main
|
||||
{:init-fn frontend.publishing/init
|
||||
:depends-on #{:shared}}
|
||||
:modules {:main
|
||||
{:init-fn frontend.publishing/init}
|
||||
:code-editor
|
||||
{:entries [frontend.extensions.code]
|
||||
:depends-on #{:main}}
|
||||
|
||||
Reference in New Issue
Block a user