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

Project templates for deps-new #404

Closed
practicalli-johnny opened this issue Feb 18, 2022 · 1 comment
Closed

Project templates for deps-new #404

practicalli-johnny opened this issue Feb 18, 2022 · 1 comment
Assignees

Comments

@practicalli-johnny
Copy link
Contributor

practicalli-johnny commented Feb 18, 2022

Create a repository of Clojure CLI project templates that include common code and configuration to support production grade services and libraries

dev/user.clj for development tools ✅

  • hotloading libraries with add-libs
  • portal data inspector
  • mulog and tap publisher
  • find-deps library search

Editor support ✅

  • Emacs .dir-locals.el configuration with recommended aliases
  • Java sources on the class path (not included - :src/java alias from Practicalli Clojure CLI Config can provide if neccessary

Build.tools configuration ✅

Include project alias for tools.build and a build.clj built tasks

DONE: research required on how best to use build.clj files and investigation into seancorfield/build-clj project - using tools.build directly

Suggested Templates

service - clojure.main and clojure.exec execution options, with build.clj, hotload libs, portal data inspector, kaocha, mulog

  • no options: creates simple webserver with jetty, using atom to hold ref to running server, mulog & publisher types
  • http-kit: uses http-kit instead of jetty
  • integrant: integrant and integrant repl with example components and aero configuration
  • api - adds Reitit libs, middleware and example code

Optional parts

+postgres - adds next.jdbc, honeysql, postgresql driver. Example code for clojure.specs that matches the example database schema. Example persistence layer. Tools to generate spec from dB schema (and vice versa)

Common aliases ✅

  • :run/service - run the project using clojure.exec
  • :dev/reloaded - include dev/user.clj file and associated development tools
  • :test/env - paths and deps for test runners
  • :test/run - run kaocha test runner
  • :test/watch - run kaocha test runner in watch mode

Common dependencies

  • Latest Clojure release
  • kaocha test runner (include a tests.edn configuration)
  • mulog for logging
  • Integrant & areo for system configuration
  • add-libs for hot-loading
  • reitit for routing (APIs)

Related projects

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

No branches or pull requests

1 participant