Add `rain` CLI
rads opened this issue · comments
Radford Smith commented
# Standalone install
curl -o- https://raw.githubusercontent.com/rads/rain/main/rain > ~/.local/bin/rain
# Depends on clojure/tools/clojure and borkdude/brew/babashka
# `bbin` can be invoked w/o installing via `rain install`
brew install rads/tools/rain
# Install via bbin
bbin install io.github.rads/rain
# Create a new project
rain new <dir>
rain new <dir> --template ssg
rain new <dir> --template isg
rain new <dir> --template ssr
rain new <dir> --template csr
rain new <dir> --template hydration
# Alias for `bb dev`
# If `bb dev` not defined, run default main namespace with nREPL included
rain dev
# Run both `rain test-clj` and `rain test-cljs`
rain test
# Alias for `bb test-clj`
# If `bb test-clj` not defined, run tests with `cognitect-labs/test-runner`
rain test-clj
# Alias for `bb test-cljs`
# If `bb test-cljs` not defined, run tests with `shadow-cljs`
rain test-cljs
# Alias for `clj` (no aliases) or `clj -A` (with aliases)
rain repl
# Alias for `clojure -X`
rain exec <fn-sym>
# Alias for `clojure -M`
rain main <main-ns>
Radford Smith commented
WIP branch: https://github.com/rads/rain/tree/cli
Radford Smith commented
I'm going to remove rain run
and rain install
for now since the behavior wouldn't match similar commands in other CLIs (npm run/install
, cargo run/install
), nor would it match any behavior in the existing Clojure CLI.
Radford Smith commented
Merged in the first version: 93fcc37
Creating separate issues for follow up improvements.