This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-21
Channels
- # adventofcode (8)
- # announcements (20)
- # babashka (43)
- # beginners (8)
- # biff (12)
- # calva (2)
- # cider (5)
- # clerk (6)
- # clj-commons (12)
- # clj-kondo (16)
- # clojure (20)
- # clojure-denver (1)
- # clojure-europe (14)
- # clojure-nl (1)
- # clojure-norway (105)
- # clojure-uk (2)
- # clojuredesign-podcast (5)
- # clojurescript (29)
- # datomic (2)
- # hyperfiddle (13)
- # jackdaw (1)
- # jobs (4)
- # jobs-discuss (4)
- # lsp (2)
- # malli (12)
- # pathom (2)
- # pedestal (1)
- # re-frame (22)
- # shadow-cljs (37)
- # squint (28)
- # xtdb (28)
- # yamlscript (4)
I’m trying to use (condp)
but getting a js error about _EQ_
not being defined. I see there is a _EQ_
in cherry but not in squint
Why not just use case in this case then? You can work around this by defining = yourself for now, it doesn’t exist as a var in squint yet. GitHub issue welcome
I think a stumble upon a way yo escape hatch down to JavaScript from squint cljs. Is this a thing ?
Is it currently possible to use “simple” cljs deps with squint ? If the library doesn’t use feature not available in squint they should be able to work ?
yes, but there is no dependency management thingie in place, so for now you have to copy those sources
what you can do (and what is done for #C029PTWD3HR) is that you could create an uberjar for your dependencies and then unzip this to a directory and add this directory to your :paths
in squint.edn
bb --config my_deps.edn uberjar my_dependencies.jar
should do that, if you have #CLX41ASCS installedHow do I install reagent to use with squint? Came across the only mention in squint repo: https://github.com/squint-cljs/squint/blob/main/test/squint/clerk.clj#L24 I wonder where it comes from. Thanks.
really wanted to use squint in a project more interop demanding, but seems I have to copy the sources for deps.. hmm I'll give it a try to cherry in the meantime, no biggie 👍
check out the https://github.com/squint-cljs/squint/tree/main/examples/vite-react example, vite is the missing piece for hot-reloading with front-end development for squint
Nice, thank you for showing to me. tbh, I never really needed hot-reloading. just reloading is fine. Not even a REPL is a must have. As long as I don't have to see javascript code or wait a gazillion time for something to build, I'm happy.
Btw, followed the tutorial and getting this:
> bb dev
[squint] Watching paths: src
[squint] Compiling CLJS file: src/app.cljs
[squint] Wrote file: /home/c/proj/front/public/js/app.jsx
[squint] Copying resource src/home.clj to /home/c/proj/front/public/js
The CJS build of Vite's Node API is deprecated. See for more details.
failed to load config from /home/c/proj/front/viteconfig.js
error when starting dev server:
Error: Cannot find module '@vitejs/plugin-react'
Require stack:
- /home/c/proj/front/viteconfig.js
- /home/c/proj/front/node_modules/vite/dist/node/chunks/dep-R0I0XnyH.js
Running node v21.4.0
cat package.json
{
"name": "front",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"react-dom": "^18.2.0",
"squint-cljs": "^0.4.85"
},
"devDependencies": {
"vite": "^5.0.10"
}
}
Had to manually install @vitejs/plugin-react:
npm install --save-dev @vitejs/plugin-react
but still getting the deprecated warning:
bb dev
[squint] Watching paths: src
[squint] Compiling CLJS file: src/app.cljs
[squint] Wrote file: /home/c/proj/front/public/js/app.jsx
[squint] Copying resource src/home.clj to /home/c/proj/front/public/js
The CJS build of Vite's Node API is deprecated. See for more details.
VITE v5.0.10 ready in 430 ms
➜ Local:
➜ Network: use --host to expose
➜ press h + enter to show help
To clear the warning, added "type": "module" to package.json
:
{
"name": "front",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"react-dom": "^18.2.0",
"squint-cljs": "^0.4.85"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.2.1",
"vite": "^5.0.10"
}
}