Skip to content

How to use JavaScript together? #146

Open

Description

@PlumpMath

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.

Activity

  1. ttchuong commented on Mar 21, 2022

    @ttchuong

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions