Skip to content

Commit

Permalink
tweak docs to clarify install depsOnly option (#1020)
Browse files Browse the repository at this point in the history
* tweak docs to clarify install depsOnly option

* tweak docs to clarify install options for local development

* tweak docs to clarify install options for local development

* tweak docs to clarify install options for local development
  • Loading branch information
elcritch authored Aug 16, 2022
1 parent 9fd9c1b commit 05ecb8e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
27 changes: 21 additions & 6 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,32 @@ version range, for example:

The latter command will install a version that is greater than ``0.5``.

If you don't specify a parameter and there is a ``package.nimble`` file in your
current working directory then Nimble will install the package residing in
the current working directory. This can be useful for developers who are locally
testing their ``.nimble`` files before submitting them to the official package
list. See the [Creating Packages](#creating-packages) section for more info on this.

Nim flags provided to `nimble install` will be forwarded to the compiler when
building any binaries. Such compiler flags can be made persistent by using Nim
[configuration](https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files)
files.

#### Local Package Development

The ``install`` command can also be used for locally testing or developing a
Nimble package by leaving out the package name parameter. Your current working
directory must be a Nimble package and contain a valid ``package.nimble`` file.

Nimble will install the package residing in the current working directory when you
don't specify a package name and the directory contains a ``package.nimble`` file.
This can be useful for developers who are locally testing their ``.nimble`` files
before submitting them to the official package list.
See the [Creating Packages](#creating-packages) section for more info on this.

Dependencies required for developing or testing a project can be installed by
passing `--depsOnly` without specifying a package name. Nimble will then install
any missing dependencies listed in the package's ``package.nimble`` file in the
current working directoy. Note that dependencies will be installed globally.

For example to install the dependencies for a Nimble project ``myPackage``:

$ cd myPackage/ && nimble install --depsOnly

#### Package URLs

A valid URL to a Git or Mercurial repository can also be specified, Nimble will
Expand Down
3 changes: 2 additions & 1 deletion src/nimblepkg/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ Usage: nimble [nimbleopts] COMMAND [cmdopts]
Commands:
install [pkgname, ...] Installs a list of packages.
[-d, --depsOnly] Install only dependencies.
[-d, --depsOnly] Only install dependencies. Leave out pkgname
to install deps for a local nimble package.
[-p, --passNim] Forward specified flag to compiler.
[--noRebuild] Don't rebuild binaries if they're up-to-date.
develop [pkgname, ...] Clones a list of packages for development.
Expand Down

0 comments on commit 05ecb8e

Please sign in to comment.