finalize build

This commit is contained in:
Travis Shears 2026-05-27 21:38:25 +01:00
parent c652c21213
commit a99c2a8152
Signed by: travisshears
GPG key ID: CB9BF1910F3F7469
5 changed files with 10 additions and 3 deletions

3
.gitignore vendored
View file

@ -4,3 +4,6 @@
.lsp/
tokens.clj
*.love
/time-guesser
/dist
*.zip

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
24

View file

@ -1,2 +1,5 @@
build:
./minify.bb main.fnl
zip time-guesser.love main.lua main.min.fnl bootstrap.fnl fennel.lua L5.lua
bash -c 'source ~/.nvm/nvm.sh && nvm use && yarn dlx love.js time-guesser.love dist -c'
zip -r time-guesser-web.zip dist

View file

@ -12,7 +12,6 @@
(defn tokenize [source]
(let [chars (vec source) total-chars (count chars)]
(loop [cursor 0 tokens []]
; (when (< cursor 100) (pprint {:tokens tokens}))
(if (>= cursor total-chars)
tokens
(let [c (chars cursor) nxt (get chars (inc cursor))]
@ -98,7 +97,6 @@
(defn needs-space?
"does this token need space before it?"
[prev current nxt]
(when (= (current :type) :string) (pprint {:current current}))
(or
(= (current :type) :open-annon-fn)
(and
@ -178,7 +176,6 @@
re-map (build-rename-map (collect-bindings tokens))
output (emit tokens re-map)
output-file-name (gen-output-file-name file-name)]
(pprint {:output output :token-sample (take 15 tokens) :bindings (build-rename-map (collect-bindings tokens))})
(write-file "tokens.clj" (with-out-str (pprint (transform-tokens tokens re-map))))
(write-file output-file-name output)
(println (str "Wrote file " output-file-name))))

3
package.json Normal file
View file

@ -0,0 +1,3 @@
{
"packageManager": "yarn@4.15.0"
}