Fork me on GitHub
#shadow-cljs
<
2019-04-19
>
vinurs03:04:21

when i in emacs, and run cider-jack-in-clj&cljs, it output this error

vinurs03:04:55

does this a shadow-cljs error ? or cider?

thheller07:04:39

@haiyuan.vinurs when you run in embedded mode you need to start the server instance yourself. https://shadow-cljs.github.io/docs/UsersGuide.html#embedded

vinurs10:04:16

@thheller thanks, it works now

vinurs10:04:45

the chrome shows this error

thheller10:04:25

which shadow-cljs version do you use?

thheller10:04:41

I don't know. the library just uses a regeneratorRuntime global variable without any indication where that is supposed to come from

thheller10:04:48

I know its a babel thing

thheller10:04:07

I think you are supposed to require something else to make that global available

thheller10:04:14

I don't know why the lib is bundled that way

thheller10:04:10

you can probably use this ["react-native-storage/src/storage" :refer (Storage)]

thheller10:04:11

but honestly you will be way better off skipping the entire library. writing a similar version that stores EDN or transit will be much more useful

vinurs10:04:54

i just want to use html5 localstorage, so i found this library can use in both broswer and react-native, so i want to integrate it

thheller10:04:26

you can set :js-options {:babel-preset-config {:targets {:chrome 74}}}

thheller10:04:49

that will make it skip trying to rewrite the class ... extends definitions

thheller10:04:00

seriously though .. don't use that library

claudiu11:04:31

Hi. Silly question.. is there any trick for nodejs or browser repl to send the promise result, after evaluating a form ?

claudiu11:04:41

like

(-> get-db-result
  (prom/then (fn [x]
   (fn-send-to-repl x))))

vinurs11:04:29

it seems should require as this

vinurs11:04:59

how can i translate this code to cljs?

vinurs11:04:46

i tried this, it seems have been save in localstorage, but i can not load it

vinurs13:04:10

found the answer

lilactown16:04:54

are there any tools for visualizing the namespace graph of a CLJS project?

thheller17:04:28

I don't know any

lilactown17:04:39

I'm guessing that information is available somehow?

thheller17:04:47

yeah. there is no official API to get it but it is there