Skip to content

Commit

Permalink
Docs: update install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Jun 10, 2022
1 parent b8dcd5f commit b540cd5
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,40 @@
- [Installation](#installation)
- [License](#license)

## Installation
## Global dependency

```console
pip install hatch-nodejs-version
Ensure `hatch-nodejs-version` is defined within the `build-system.requires` field in your `pyproject.toml` file.

```toml
[build-system]
requires = ["hatchling", "hatch-nodejs-version"]
build-backend = "hatchling.build"
```

## Version source

The [version source plugin](https://hatch.pypa.io/latest/plugins/version-source/) name is `nodejs`.

- ***pyproject.toml***

```toml
[tool.hatch.version]
source = "nodejs"
```

- ***hatch.toml***

```toml
[version]
source = "nodejs"
```

### Version source options

| Option | Type | Default | Description |
|---------------| --- |---------------|--------------------------------------------|
| `path` | `str` | `package.json` | Relative path to the `package.json` file. |

## License

`hatch-nodejs-version` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

0 comments on commit b540cd5

Please sign in to comment.