game4 / client / shadow-cljs.edn
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
;; shadow-cljs builds for the séance client (CLJS app canon: game1).
;;
;; :app — the browser build. It bundles its npm deps (the libp2p family is
;; plain ESM in node_modules; shadow's default :browser bundling consumes it).
;; The two ardegazu kits are NOT among them: id-kit and social-kit are
;; ClojureScript libraries compiled from source off the classpath
;; (client/deps.edn), so they are ordinary namespaces in this module graph.
;; Two modules keep the social-kit lazy boundary REAL: :main carries the game
;; + net + ardegazu.social.join (the lean chips — that namespace requires only
;; ardegazu.social.text), :social is loaded via shadow.lazy after boot and is
;; the ONLY module reaching ardegazu.social.{gamelb,app-boot} (GameLb +
;; attach-social). ardegazu.social.net — the kit's sole libp2p-bearing
;; namespace — is required by nothing here, so it never enters either module.
;;
;; :asset-path is RELATIVE — one build must serve at
;; https://game4.ardegazu.ro/ and /ipfs/<cid>/ alike.
;;
;; :testlib — the pure game/net logic compiled to node-consumable ESM for the
;; black-box tests in test/*.test.mjs (golden vectors from the TS canon).
{:deps {:aliases [:dev]}
 ;; BOTH dev ports serve public/ + dist-dev/ — the WATCH's own output tree,
 ;; never dist/. dist/ belongs to `ardz build` alone: it holds a RELEASE build
 ;; (goog.DEBUG=false → the PRODUCTION relay), and the old
 ;; `4173 {:roots ["dist"]}` arm served exactly that to a dev tab whenever
 ;; the watcher had not overwritten it yet (or the browser had cached it) —
 ;; two tabs of one dev session then sat on DIFFERENT relays and never met.
 ;; scripts/dev.mjs redirects the watch to dist-dev/assets via --config-merge;
 ;; smoke a release build with a standalone static server over dist/, never
 ;; through these ports.
 ;; :use-index-files true — without it shadow's undertow file handler gets NO
 ;; welcome files (it only sets them from this key), so a directory request
 ;; ("/", "/id/") falls through to the push-state handler, which 404s any
 ;; request whose Accept header lacks text/html (curl, fetch). With it, "/"
 ;; serves index.html from the first root that has one.
 :dev-http {5173 {:roots ["public" "dist-dev"] :push-state/index "index.html" :use-index-files true}
            4173 {:roots ["public" "dist-dev"] :push-state/index "index.html" :use-index-files true}}
 :builds
 {:app
  {:target :browser
   :output-dir "dist/assets"
   :asset-path "./assets"
   :compiler-options {:optimizations :advanced
                      :infer-externs :auto
                      :source-map false}
   :module-loader true
   :modules
   {:main {:init-fn game4.main/init}
    :social {:entries [game4.social]
             :depends-on #{:main}}}}
  :testlib
  {:target :esm
   :output-dir "test-dist"
   :compiler-options {:optimizations :simple
                      :source-map false}
   :js-options {:js-provider :import}
   :modules
   {:testlib
    {:entries [game4.testlib]
     :exports {aliveSeats game4.game.sim/alive-seats
               hauntWeights game4.game.sim/haunt-weights
               pickHaunt game4.game.sim/pick-haunt
               hintNot game4.game.sim/hint-not
               mediumSeat game4.game.sim/medium-seat
               resolveRooms game4.game.sim/resolve-rooms
               occupancy game4.game.sim/occupancy
               snuff game4.game.sim/snuff!
               nextPrevRooms game4.game.sim/next-prev-rooms
               seanceOver game4.game.sim/seance-over?
               winnerOf game4.game.sim/winner-of
               freeSigilOf game4.game.sim/free-sigil-of
               seanceOrder game4.game.sim/seance-order
               claimDecision game4.game.sim/claim-decision
               bystanderClaimWins game4.game.sim/bystander-claim-wins
               electHost game4.game.sim/elect-host
               lowestOf game4.game.sim/lowest-of
               roman game4.game.sim/roman
               candleStr game4.game.sim/candle-str
               walkMs game4.game.sim/walk-ms
               mkHi game4.game.frames/mk-hi
               mkRo game4.game.frames/mk-ro
               mkSt game4.game.frames/mk-st
               mkBe game4.game.frames/mk-be
               mkHm game4.game.frames/mk-hm
               mkPk game4.game.frames/mk-pk
               mkPc game4.game.frames/mk-pc
               mkRv game4.game.frames/mk-rv
               mkOv game4.game.frames/mk-ov
               mkLo game4.game.frames/mk-lo
               mkFu game4.game.frames/mk-fu
               mkSn game4.game.frames/mk-sn
               isGameFrame game4.game.frames/is-game-frame
               newRoomSecret game4.net.room-crypto/new-room-secret
               createRoomCrypto game4.net.room-crypto/create-room-crypto
               toB64url game4.net.room-crypto/to-b64url
               fromB64url game4.net.room-crypto/from-b64url
               protocolOf game4.net.peers/protocol-for
               picksMap game4.testlib/picks-map
               catalogKeys game4.testlib/catalog-keys
               catalogMsg game4.testlib/catalog-msg}}}}}}

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/game4.git