Skip to content

Commit

Permalink
address #32
Browse files Browse the repository at this point in the history
  • Loading branch information
seancorfield committed Aug 1, 2022
1 parent 27b529a commit b785055
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changes

* v0.4.next in progress
* Address [#32](https://github.com/seancorfield/deps-new/issues/32) by adding `:scratch/file` variable, defaulting to `"scratch"`.

* v0.4.12 37aa288 -- 2022-06-10
* Bump `deps-new` in `template` to non-broken version.

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ with a simple `exec` function (you can invoke via `clojure -X scratch/exec`) and
simple `-main` function (you can invoke via `clojure -M -m scratch`). This is intended
to be a minimal "playground" to get started with `deps.edn` and the CLI.

If you want the `scratch.clj` file to have a different name, you can override the
default with `:scratch/file`:

```bash
clojure -Tnew scratch :name play :scratch/file ground
```

The created file will be `src/ground.clj` in the `play` folder.

## Create a Fully-Fleshed `pom.xml`

```bash
Expand Down
2 changes: 2 additions & 0 deletions play/deps.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{:paths ["src"]
:deps {}}
12 changes: 12 additions & 0 deletions play/src/ground.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(ns scratch
"FIXME: my new org.corfield.new/scratch project.")

(defn exec
"Invoke me with clojure -X scratch/exec"
[opts]
(println "exec with" opts))

(defn -main
"Invoke me with clojure -M -m scratch"
[& args]
(println "-main with" args))
5 changes: 4 additions & 1 deletion resources/org/corfield/new/scratch/template.edn
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{}
{:scratch/file "scratch"
:transform
[["src" "src"
{"scratch.clj" "{{scratch/file}}.clj"}]]}

0 comments on commit b785055

Please # to comment.