Commit 46a3aa8a by Brad Brown Committed by GitHub

docs: add "extras" example to scripts docs (#1181)

After digging around in the poetry code to figure out
how to include an `extras` key in a CLI script,
I thought it might be a useful thing to add to the docs
for future users.
parent a694aadb
......@@ -262,6 +262,13 @@ poetry = 'poetry.console:run'
Here, we will have the `poetry` script installed which will execute `console.run` in the `poetry` package.
To specify a script that [depends on an extra](#extras), you may provide an entry as an inline table:
```toml
[tool.poetry.scripts]
devtest = { callable = "mypackage:test.run_tests", extras = ["test"] }
```
{{% note %}}
When a script is added or updated, run `poetry install` to make them available in the project's virtualenv.
{{% /note %}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment