game6 / 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
;; shadow-cljs builds for the odeon 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://game6.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).
;; Only namespaces that load cleanly under node belong in its graph: sim,
;; frames, audio, the catalogs and net/ do; anything pulling game6.i18n
;; (which hydrates the document at load) or the DOM does not.
{: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 game6.main/init}
    :social {:entries [game6.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 [game6.testlib]
     :exports {;; clock arithmetic
               beatMsOf game6.game.sim/beat-ms-of
               barMsOf game6.game.sim/bar-ms-of
               stepMsOf game6.game.sim/step-ms-of
               nextBarAt game6.game.sim/next-bar-at
               phaseOf game6.game.sim/phase-of
               beatIndexOf game6.game.sim/beat-index-of
               rebasedOriginOf game6.game.sim/rebased-origin-of
               syncSample game6.game.sim/sync-sample
               authorityOrigin game6.game.sim/authority-origin
               ;; roster, seats and the referee
               normInst game6.game.sim/norm-inst
               clampBpm game6.game.sim/clamp-bpm
               freeColorOf game6.game.sim/free-color-of
               musicianCountOf game6.game.sim/musician-count-of
               grantInst game6.game.sim/grant-inst
               canTakeSeat game6.game.sim/can-take-seat?
               electHost game6.game.sim/elect-host
               incumbentWins game6.game.sim/incumbent-wins?
               roAction game6.game.sim/ro-action
               fromHost game6.game.sim/from-host?
               ageSlackS game6.game.sim/AGE-SLACK-S
               ;; loop station
               loopId game6.game.sim/loop-id
               loopLenOrDefault game6.game.sim/loop-len-or-default
               captureNote game6.game.sim/capture-note?
               quantizeEvents game6.game.sim/quantize-events
               closeNote game6.game.sim/close-note!
               evictId game6.game.sim/evict-id
               metronomeBeats game6.game.sim/metronome-beats
               loopWindowEvents game6.game.sim/loop-window-events
               audioTimeAt game6.game.sim/audio-time-at
               tickMs game6.game.sim/TICK-MS
               lookaheadMs game6.game.sim/LOOKAHEAD-MS
               ;; snapshot
               keepSnapLoop game6.game.sim/keep-snap-loop?
               snapLoops game6.game.sim/snap-loops
               ;; instrument layer
               snapPent game6.game.sim/snap-pent
               therMidi game6.game.sim/ther-midi
               clampGrandBase game6.game.sim/clamp-grand-base
               clampBassBase game6.game.sim/clamp-bass-base
               noteNames game6.game.sim/NOTE-NAMES
               blackKeys game6.game.sim/BLACK-KEYS
               minPent game6.game.sim/MIN-PENT
               therLo game6.game.sim/THER-LO
               therHi game6.game.sim/THER-HI
               keyrow game6.game.sim/KEYROW
               padkeys game6.game.sim/PADKEYS
               grandBase game6.game.sim/GRAND-BASE
               bassBase game6.game.sim/BASS-BASE
               padNames game6.game.audio/PAD-NAMES
               ;; wire frames
               mkHi game6.game.frames/mk-hi
               mkRo game6.game.frames/mk-ro
               mkTr game6.game.frames/mk-tr
               mkPg game6.game.frames/mk-pg
               mkPo game6.game.frames/mk-po
               mkNt game6.game.frames/mk-nt
               mkNf game6.game.frames/mk-nf
               mkTs game6.game.frames/mk-ts
               mkTc game6.game.frames/mk-tc
               mkTe game6.game.frames/mk-te
               mkLp game6.game.frames/mk-lp
               mkLx game6.game.frames/mk-lx
               mkAp game6.game.frames/mk-ap
               mkSn game6.game.frames/mk-sn
               isGameFrame game6.game.frames/is-game-frame
               ;; room membership crypto
               newRoomSecret game6.net.room-crypto/new-room-secret
               createRoomCrypto game6.net.room-crypto/create-room-crypto
               toB64url game6.net.room-crypto/to-b64url
               fromB64url game6.net.room-crypto/from-b64url
               protocolOf game6.net.peers/protocol-for
               ;; catalogs + compiled-in constants
               catalogKeys game6.testlib/catalog-keys
               catalogMsg game6.testlib/catalog-msg
               constants game6.testlib/constants}}}}}}

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