Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use JavaScript together? #146

Open
PlumpMath opened this issue Mar 3, 2022 · 1 comment
Open

How to use JavaScript together? #146

PlumpMath opened this issue Mar 3, 2022 · 1 comment

Comments

@PlumpMath
Copy link

PlumpMath commented Mar 3, 2022

Hi, I just want to mix it up.
Where do you put the files, and what settings do you need? Is it the same as the regular clojure deps.edn cli? ;; I don't know what to do.
Thanks.

@ttchuong
Copy link

Unlike shadow-cljs, krell seems not support :require arbitrary js files. However, krell is able to js/require those js very well.
Let say I follow the tutorial and compile the output into a target folder. Then, I have js/hello.js and want to consume it. The below line of code will work.

(def hello (js/require "../js/hello.js"))

(Note that js and target are at the same level of folder)
I can verify the output js by visiting target/krell_npm_deps.js as well. The hello.js should be required there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants