shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
adamrenklint 2020-09-17T15:53:21.375200Z

I’ve got a :target :bootstrap build and it works great to get all the sources, but if any code captured in the bootstrap is changed and then after-load function is called in the host build and I run boot/init again, I get stale code in the bootstrap build. Seems if the index has been built once, it never tries to fetch any code again. Feels a bit at odds with the fantastic reload mechanics of Shadow, and is not particularly helpful while developing. I tried a workaround where I would simply reset the index-ref and force all sources to be fetched again, but the ran into issues with goog namespaces “already being provided”. Feels like I’m maybe holding the tool wrong? Has anyone else found a nice reloadable workflow when working with the bootstrap target?

JAtkins 2020-09-17T15:57:03.376500Z

Is there anything I'm missing here? Trying to convert this js example

import {AgGridColumn, AgGridReact} from 'ag-grid-react';
import 'ag-grid-community/dist/styles/ag-grid.css';
import 'ag-grid-community/dist/styles/ag-theme-alpine.css';
to a cljs import.
["ag-grid-react" :as agr :refer [AgGridReact]]
;;TODO: can't figure out how to bring in styles:
["ag-grid-community/dist/styles/ag-grid.css"]
["ag-grid-community/dist/styles/ag-theme-alpine.css"]
The compiler error looks like this:
errors in file: /home/jarrett/.../NewSite/node_modules/ag-grid-community/dist/styles/ag-grid.css
{:js-str-offsets [], :js-esm false, :js-imports [], :js-invalid-requires [], :goog-provides [], :js-language "es8", :goog-module nil, :js-warnings [], :resource-name "node_modules/ag-grid-community/dist/styles/ag-grid.css", :js-requires [], :js-errors [{:line 6, :column 72, :message "Semi-colon expected"}], :goog-requires [], :tag :shadow.build.npm/errors, :uses-global-buffer false, :uses-global-process false}
ExceptionInfo: errors in file: /home/jarrett/.../NewSite/node_modules/ag-grid-community/dist/styles/ag-grid.css

thheller 2020-09-17T16:10:21.377200Z

@jatkin CSS is not supported and cannot be imported that way via CLJS :require

JAtkins 2020-09-17T16:11:25.377600Z

Gacha, just importing it via <link ... for now.

2020-09-21T12:17:54.068Z

How to import use <link? Thanks.

JAtkins 2020-09-21T18:38:40.077500Z

Just via html tags

2020-09-17T18:58:00.378100Z

Hi folks, can I create an npm package with shadow-cljs that I can then import in a typescript project?

thheller 2020-09-17T19:05:29.378300Z

you can via :npm-module

Alex J Henderson 2020-09-17T21:26:33.380600Z

Hi, We're noticing that since shadow-cljs 2.10.0 the autocomplete/intellisense is broken, when using VS Code & Calva, is this a known issue? (curiously it does work for a few seconds after jack-in but breaks when the build is compiled)

thheller 2020-09-17T21:27:40.380800Z

https://github.com/rksm/clj-suitable/issues/15

👍 1
pez 2020-09-17T23:08:50.384100Z

Please note that this issue also affects cljs completions in Calva if the JSCompletion setting is enabled. Disable this in VS Code for shadow projects until a resolution is found.

👍 1