[docs] Update TEMPLATES.md to refer to resources dir rather than src dir
The current documentation claims template files live in src, rather than resources - a fact trivially disprovable by either (a) referring to Leiningen's default templates in resources/leiningen/new or (b) actually trying to make a new template yourself. This commit updates the documentation to refer to the correct directory.
This commit is contained in:
parent
d39e93b391
commit
80eba3e5ff
1 changed files with 8 additions and 5 deletions
|
@ -32,11 +32,14 @@ Your new template would look like:
|
||||||
├── LICENSE
|
├── LICENSE
|
||||||
├── project.clj
|
├── project.clj
|
||||||
├── README.md
|
├── README.md
|
||||||
|
├── resources
|
||||||
|
| └── leiningen
|
||||||
|
| └── new
|
||||||
|
| └── liquid_cool
|
||||||
|
| └── foo.clj
|
||||||
└── src
|
└── src
|
||||||
└── leiningen
|
└── leiningen
|
||||||
└── new
|
└── new
|
||||||
├── liquid_cool
|
|
||||||
│ └── foo.clj
|
|
||||||
└── liquid_cool.clj
|
└── liquid_cool.clj
|
||||||
|
|
||||||
Note that you'll now have a new and separate project named
|
Note that you'll now have a new and separate project named
|
||||||
|
@ -50,14 +53,14 @@ an artifact-id of "lein-template".
|
||||||
## Structure
|
## Structure
|
||||||
|
|
||||||
The files that your template will provide to users are in
|
The files that your template will provide to users are in
|
||||||
`src/leiningen/new/liquid_cool`. The template generator starts you off
|
`resources/leiningen/new/liquid_cool`. The template generator starts you off
|
||||||
with just one, named "foo.clj". You can see it referenced in
|
with just one, named "foo.clj". You can see it referenced in
|
||||||
`src/leiningen/new/liquid_cool.clj`, right underneath the
|
`src/leiningen/new/liquid_cool.clj`, right underneath the
|
||||||
`->files data` line.
|
`->files data` line.
|
||||||
|
|
||||||
You can delete `foo.clj` if you like (and its corresponding line in
|
You can delete `foo.clj` if you like (and its corresponding line in
|
||||||
`liquid_cool.clj`), and start populating that
|
`liquid_cool.clj`), and start populating that
|
||||||
`src/leiningen/new/liquid_cool` directory with the files you wish to be
|
`resources/leiningen/new/liquid_cool` directory with the files you wish to be
|
||||||
part of your template. For everything you add, make sure the
|
part of your template. For everything you add, make sure the
|
||||||
`liquid_cool.clj` file receives corresponding entries in that `->files`
|
`liquid_cool.clj` file receives corresponding entries in that `->files`
|
||||||
call. For examples to follow, have a look inside [the \*.clj files for
|
call. For examples to follow, have a look inside [the \*.clj files for
|
||||||
|
@ -95,7 +98,7 @@ and that we have a template file which looks up the key X by wrapping it in
|
||||||
double mustaches like so: `{{X}}`. As for our input name, `data` already
|
double mustaches like so: `{{X}}`. As for our input name, `data` already
|
||||||
contains the line `:name name`, which means we can lookup the input name by
|
contains the line `:name name`, which means we can lookup the input name by
|
||||||
writing `{{name}}` in the template file. To try it out, save the following
|
writing `{{name}}` in the template file. To try it out, save the following
|
||||||
contents in the file `src/leiningen/new/liquid_cool/README.md`:
|
contents in the file `resources/leiningen/new/liquid_cool/README.md`:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
# {{name}}
|
# {{name}}
|
||||||
|
|
Loading…
Reference in a new issue