Fork me on GitHub
#clojurescript
<
2019-08-18
>
Matt00:08:16

Sorry if this type of question should go to the beginner channel. But I’m trying to figure out how to contribute to documentation and support for full stack clj + cljs apps. I’m wondering if someone has a good resource to point me to. Or, if I can contribute in any way, where would be the place to start? I’m trying to get a clear mental model about how to make an application with an om next front end, integrated with a datomic backend on AWS. I feel like this would make a good book that hasn’t been published yet.

Silenced Ego05:08:48

Given that requiring local .js files is experimental in shadow-cljs (https://shadow-cljs.github.io/docs/UsersGuide.html#classpath-js), what are the best practices when wanting to mix js files and clojurescript files in a project? Like... if possible, should clojure code all export and no JS imports, and then have JS glue code, or npm packages import is OKAY but local file .js imports should be avoided, or none of these?

thheller07:08:31

@thomasskinner76 no best practice since CLJS without shadow-cljs doesn't support easily mixing .js files into the project. if it is just your project and not a library it is fine to use the direct interop in shadow-cljs.

❤️ 4
thheller07:08:03

CLJS has some support for mixing Js files in via :libs but that is limited to one way and those files won't have full access to CLJS code

abdullahibra11:08:34

if i have flow of some pages and want to disable back from this specific page

abdullahibra11:08:11

or is there another approach to do this rather than disable history

abdullahibra11:08:48

how might be an alternative for this?

abdullahibra11:08:21

could i make the back button to not get back to previous page but to the home page?

girish14:08:30

Complete clojure/cljs newbie, bootstrapped a project with shadow-cljs to display latest artworks from behance https://github.com/girishso/xilop For some reason not able to get routing working.. tried using secretary/`accountant`… maybe i’m missing something obvious(?). Also, would appreciate any feedback on coding style/structure or anything that stands out to you

❤️ 4
jaihindhreddy14:08:35

might wanna also post in #code-reviews

girish14:08:32

@U883WCP5Z Cool! Thanks! 🙂

Silenced Ego15:08:26

@thheller I notice that :target npm-module outputs all these generated file names by translating namespace barriers to dots like "foo.bar.js". May I request a feature, that instead of dots, it just uses folder nesting for the namespaces? I think this is more intuitive, in this case I can require transpiled CLJS files the same way I would require typical JS files from a JS file.

thheller16:08:25

not interested in that no. they are flattened to signify CLJS namespaces and dealing with relative paths in node is super annoying so it makes my life easier

Silenced Ego15:08:49

This would also mean that my source directory where my js and cljs files are mixed in folders, can mimic the output directory structure

tianshu15:08:02

how can I get the full qualified name in macro? for example I have (some-macro r/render), I want get reagent.core/render in the macro.

Silenced Ego15:08:08

@doglooksgood syntax quote should work, using back tick `

tianshu15:08:50

is it impossible w/o syntax quote?

Silenced Ego15:08:59

(some-macro `r/render)

tianshu16:08:42

@thomasskinner76 I think (:name (cljs.analyzer.api/resolve &env sym)) works. I'm very sorry I think I have asked once few years before, and David Nolen already told me once.😭

abdullahibra20:08:28

how can convert this js code to clojurescript:

abdullahibra20:08:41

this is my try: