Skip to content

Instantly share code, notes, and snippets.

@wdhowe
Last active February 3, 2024 21:14
Show Gist options
  • Save wdhowe/99a4f463f96730002f4c20a058806dda to your computer and use it in GitHub Desktop.
Save wdhowe/99a4f463f96730002f4c20a058806dda to your computer and use it in GitHub Desktop.
Creating Clojure projects with deps.edn

Clojure CLI/deps Projects

Clojure CLI tools (with deps.edn) allow for a built in way to create projects.

Official CLI/deps guide: https://clojure.org/guides/deps_and_cli

  • Pre-reqs: Clojure and dependencies installed.

  • Install a project creation Tool.

    clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new
  • Create a project directory structure

    clj -Tnew app :name mygituser/myappname
  • Run tests or build.

    clj -T:build test  # Test only.
    
    clj -T:build ci    # Test, write pom, build uberjar.
  • Run the app's '-main' function.

    clj -M:run-m

@YTN01
Copy link

YTN01 commented Oct 27, 2022

clj-Tnew app :name mygituser/myappname

clj -Tnew app :name mygituser/myappname

@goosecoid
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment