Skip to content

Commit b540cd5

Browse files
committed
Docs: update install instructions
1 parent b8dcd5f commit b540cd5

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,40 @@
1010
- [Installation](#installation)
1111
- [License](#license)
1212

13-
## Installation
13+
## Global dependency
1414

15-
```console
16-
pip install hatch-nodejs-version
15+
Ensure `hatch-nodejs-version` is defined within the `build-system.requires` field in your `pyproject.toml` file.
16+
17+
```toml
18+
[build-system]
19+
requires = ["hatchling", "hatch-nodejs-version"]
20+
build-backend = "hatchling.build"
1721
```
1822

23+
## Version source
24+
25+
The [version source plugin](https://hatch.pypa.io/latest/plugins/version-source/) name is `nodejs`.
26+
27+
- ***pyproject.toml***
28+
29+
```toml
30+
[tool.hatch.version]
31+
source = "nodejs"
32+
```
33+
34+
- ***hatch.toml***
35+
36+
```toml
37+
[version]
38+
source = "nodejs"
39+
```
40+
41+
### Version source options
42+
43+
| Option | Type | Default | Description |
44+
|---------------| --- |---------------|--------------------------------------------|
45+
| `path` | `str` | `package.json` | Relative path to the `package.json` file. |
46+
1947
## License
2048

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

0 commit comments

Comments
 (0)