Skip to content

Commit 315d9a1

Browse files
committed
Further update documentation for stack new
1 parent 31b11f5 commit 315d9a1

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

doc/new_command.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ The project is created in a new directory named after the package, unless the
1313
`--bare` flag is passed, in which case the project is created in the current
1414
directory.
1515

16-
The template used is a default one (named `new-template`), unless another
17-
template is specified as an argument.
18-
1916
The `--param <key>:<value>` option specifies a key-value pair to populate a key
2017
in a template. The option can be specified multiple times.
2118

@@ -24,34 +21,43 @@ The arguments specifying directories and the `--ignore-subdirs`, `--force` and
2421

2522
## Project templates
2623

27-
Project template files can be located in a repository named `stack-templates` on
28-
GitHub, GitLab or Bitbucket; at a URL; or on the local file system.
24+
A project template file can be located in a repository named `stack-templates`
25+
on GitHub, GitLab or Bitbucket; at a URL; or on the local file system.
2926

3027
Project template file names have the extension `.hsfiles`. The extension does
31-
not need to be specified.
28+
not need to be specified with `stack new`.
3229

3330
A project template file `my-template.hsfiles` in a repository
34-
`username/stack-templates` on GitHub, GitLab or Bitbucket can be specified as:
31+
`username/stack-templates` on GitHub, GitLab or Bitbucket can be specified
32+
with `stack new` as:
3533

3634
~~~test
3735
<service>:username/my-template
3836
~~~
3937

4038
where `<service>` is one of `github` for [GitHub](https://github.com/),
41-
`gitlab:` for [GitLab](https://gitlab.com), or `bitbucket:` for
39+
`gitlab` for [GitLab](https://gitlab.com), or `bitbucket` for
4240
[Bitbucket](https://bitbucket.com).
4341

4442
The default service is GitHub, the default username is `commercialhaskell` and
4543
the default project template name is `new-template`.
4644

4745
## Examples
4846

49-
Create a project with the default project template:
47+
Create a project for package `my-project` in new directory `my-project` with the
48+
default project template file:
5049

5150
~~~text
5251
stack new my-project
5352
~~~
5453

54+
Create a project for package `my-package` in the current directory with the
55+
default project template file:
56+
57+
~~~text
58+
stack new my-package --bare
59+
~~~
60+
5561
Create a project with the `rio` project template at the default repository:
5662

5763
~~~text

0 commit comments

Comments
 (0)