Fork me on GitHub
#shadow-cljs
<
2021-01-18
>
mynomoto15:01:39

On a sample project I used :target :npm-module without :entries because that was not mandatory at the time. This is used to compile test files to be ran by jest. What should I put on :entries to have the same behavior as before? That is related to @ps question as he is using the project as a reference to run tests using jest.

mynomoto15:01:42

I mean something more practical than enumerate every test namespace 😅 as this is clearly an option.

davidw16:01:59

when using watch, is it possible to get shadow to watch extra files other than a cljc/cljs files? I'm working on some tests for firebase firestore security rules (using {:target node-test :autorun true ...}) and I'd like to have the tests automatically re-run when I update the firebase.rules file.

thheller16:01:28

@davidw no not currently but you could just not use :autorun true and instead run the tests triggered by another watch util

thheller16:01:00

eg use https://github.com/paulmillr/chokidar#cli and have it watch the test output file and firebase.rules

davidw16:01:21

ok, thanks, I'll do something like that.

thheller16:01:50

@mynomoto open a github issue please so I don't forget. I can add that functionality back I guess.

👍 1
jpmonettas18:01:10

hi everybody! I'm getting a error when compiling a app that uses "http://kepler.gl" npm lib. I'm getting [2021-01-18 15:02:00.526 - INFO] :shadow.build.npm/js-invalid-requires - {:resource-name "node_modules/kepler_DOT_gl/dist/localization/index.js", :requires [{:line 44, :column 192}]}. What looks wrong is that path "node_modules/kepler_DOT_gl/..." when it should be "node_modules/kepler.gl/..." any ideas of what can be causing this?

thheller18:01:02

thats just the resource naming. the actual file is in and the name has nothing to do with the problem

thheller18:01:24

its likely the lib does some kind of dynamic require require(somethingNotAString) or so

jpmonettas18:01:49

oh you are right

jpmonettas18:01:38

it is doing require("./".concat(key))["default"]

thheller18:01:09

yeah thats not supported

jpmonettas18:01:55

oh ok, any workarounds? or this library can't be used in a shadow-cljs project?

thheller18:01:55

unlikely that will be supported by any bundler

thheller18:01:12

maybe the lib requires a webpack plugin or so and requires webpack in turn

thheller18:01:46

can't say. don't know the lib.

jpmonettas18:01:37

yeah probably, thanks a lot @thheller