Skip to content

How to include a clj file? #875

Answered by borkdude
omarpta asked this question in Q&A
Discussion options

You must be logged in to vote

You can do this in two ways:

  • load a file directly using (load-file "the-file.clj")
  • add /path/to to the classpath and then use (require 'otherfile)

You can set the classpath by making a bb.edn file that looks like:

{:paths ["path/to"]}

or by using (babashka.classpath/add-classpath "path/to")

or by using the --classpath CLI argument.

Also see http://book.babashka.org.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by borkdude
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #874 on May 31, 2021 20:43.