Skip to content

Commit df5a87e

Browse files
committed
Wire multimethod runtime into playground
Add squint-cljs/src/squint/multi.js to the playground's importmap so compiled code using defmulti/defmethod can resolve the runtime module, and extend the bb init copy list to stage multi.js + internal.js alongside the existing runtime files in public/public/src/squint/. internal.js is not in the importmap — core.js and multi.js reach it via a relative import, so it just needs to sit next to them on disk.
1 parent 5439820 commit df5a87e

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

playground/bb.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(fs/create-sym-link "public/js/squint-local" (fs/parent (fs/parent (fs/absolutize ".")))))
77
(let [squint-prod (fs/file "public" "public" "src" "squint")]
88
(fs/create-dirs squint-prod)
9-
(doseq [source-file ["core.js" "string.js" "set.js" "html.js" "math.js" "test.js"]]
9+
(doseq [source-file ["core.js" "internal.js" "string.js" "set.js" "html.js" "math.js" "multi.js" "test.js"]]
1010
(fs/copy (fs/file ".." "src" "squint" source-file)
1111
squint-prod
1212
{:replace-existing true}))))}

playground/public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"squint-cljs/src/squint/set.js": "./src/squint/set.js",
1919
"squint-cljs/src/squint/html.js": "./src/squint/html.js",
2020
"squint-cljs/src/squint/math.js": "./src/squint/math.js",
21+
"squint-cljs/src/squint/multi.js": "./src/squint/multi.js",
2122
"squint-cljs/src/squint/test.js": "./src/squint/test.js",
2223
"@codemirror/language": "https://ga.jspm.io/npm:@codemirror/[email protected]/dist/index.js",
2324
"@codemirror/lang-javascript": "https://ga.jspm.io/npm:@codemirror/[email protected]/dist/index.js",

0 commit comments

Comments
 (0)