Fork me on GitHub
#clojurescript
<
2019-02-02
>
jaide01:02:21

Does cljs only support using npm deps through :npm-deps or can tools like figwheel-main support using dependencies from package.json?

richiardiandrea01:02:44

In vanilla Cljs, you need both, only shadow allows you to specify them only in package.json

jaide01:02:11

Ah I see, thanks for clearing that up.

kwladyka16:02:47

https://github.com/kwladyka/form-validator-cljs/tree/doc here you have example how to use npm deps with figwheel-main

kwladyka16:02:34

it is real small code, so it should help

kwladyka16:02:45

https://github.com/kwladyka/form-validator-cljs/blob/doc/src/js/index.js this is the most important file to understand how it works

kwladyka16:02:58

Personally I recommend do it as I do it instead of :npm-deps, but it is my opinion 🙂

jaide01:02:22

> Declare NPM dependencies. A map of NPM package names to the desired > versions or the Boolean value false. If false then any existing > node_modules directory will not be indexed nor used. See also > :install-deps. > :npm-deps {:left-pad “1.1.3” }

jaide01:02:28

Hahahah very clever, the infamous left-pad.