Fork me on GitHub
#shadow-cljs
<
2017-09-15
>
thheller06:09:04

saw you guys talking on twitter but can’t understand anything 😛

bolasblack06:09:44

Sorry about that, I can read english but bad at speak 😛

bolasblack06:09:03

So I always inclined to speak Chinese ...

Jon13:09:50

he complained shadow-cljs.edn is too tedious(?) to write

Jon13:09:28

sometimes I think writing that file is boring too, although mostly I just copy from my minimal-xyz projects

Jon13:09:35

I found debugging macros is convenient with Lumo, easier compared to shadow-cljs, then I don't write shadow-cljs.edn when I have a REPL

bolasblack13:09:00

I sometimes use lumo run a script to generate shadow-cljs.edn 😛

bolasblack13:09:12

for example:

Jon14:09:44

so many exports

thheller14:09:48

@bolasblack I don’t quite understand what the purpose of this script is, if you have many different namespaces you want to have accessible via require then use :npm-module

thheller14:09:42

by default it compiles file to you can require("shadow-cljs/your.app").some_function()

thheller14:09:58

the purpose of :target :node-library (which you seem to be using behind shadow-clj-build/custom) is to condense all namespaces down a more manageable public “API”

thheller14:09:47

you can compile all the files into a directory

thheller14:09:19

put a package.json in that directory with a "main":"./your.app.js" and publish that to npm

thheller14:09:42

then users can require("your-package") or require("your-package/some.other.ns")

thheller14:09:49

or you can of course just require("./relative-path-to/your.app") by setting :output-dir so something other than node_modules/shadow-cljs

thheller14:09:17

sorry that :npm-module isn’t documented better but it is the basis of all node/JS tool integration so you might want to use that