Fork me on GitHub
#shadow-cljs
<
2020-09-17
>
adamrenklint15:09:21

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?

JAtkins15:09:03

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

thheller16:09:21

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

JAtkins16:09:25

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

kimim12:09:54

How to import use <link? Thanks.

JAtkins18:09:40

Just via html tags

nodename18:09:00

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

thheller19:09:29

you can via :npm-module

Alex J Henderson21:09:33

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)

pez23:09:50

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.

👍 3