finalize build
This commit is contained in:
parent
c652c21213
commit
a99c2a8152
5 changed files with 10 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -4,3 +4,6 @@
|
|||
.lsp/
|
||||
tokens.clj
|
||||
*.love
|
||||
/time-guesser
|
||||
/dist
|
||||
*.zip
|
||||
|
|
|
|||
1
.nvmrc
Normal file
1
.nvmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
24
|
||||
3
Makefile
3
Makefile
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
3
package.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"packageManager": "yarn@4.15.0"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue