Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for bork aliases and bork run <alias>. #226

Merged
merged 1 commit into from
Dec 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,45 @@ github_release_globs = ["dist/*.pyz", "dist/*.whl"]
strip_zipapp_version = true
```

## Aliases (Basic task runner)

Bork includes a very basic task runner, for single-line commands.

As an example [from Emanate](https://github.com/duckinator/emanate/blob/master/pyproject.toml),
if you put this in pyproject.toml:

```toml
[tool.bork.aliases]
# Runs *only* pylint. (Not the actual tests.)
lint = "pytest -k 'pylint' --pylint --verbose"
# Runs tests and pylint.
test = "pytest --pylint --verbose"
test-only = "pytest --verbose"
docs = "env PYTHONPATH=./ pdoc3 --html --output-dir ./html --force emanate"
```

Then you can run `bork aliases` to get the list of aliases:

```
~/emanate$ bork aliases
lint
test
test-only
docs
~/emanate$
```

And run `bork run <alias>` to run that alias:

```
~/emanate$ bork run docs
./html/emanate/index.html
./html/emanate/cli.html
./html/emanate/config.html
./html/emanate/version.html
~/emanate$
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/duckinator/bork. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the
Expand Down