Skip to content

Commit fd82242

Browse files
committed
Create readthedocs documentation
1 parent 928f6f1 commit fd82242

17 files changed

Lines changed: 317 additions & 22 deletions

File tree

.readthedocs.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Add compatibility for MAC
88
- Move `ci` and `release` Docker images from hub.docker.com to GitHub package repository
99
- Add documentation in README.md
10+
- [BC Break] Fix `BootstrapProcess` class name, it was `BoostrapProcess` before
1011

1112
### [1.0.1](../../compare/1.0.0...1.0.1) - 2024-12-02
1213

docs/.readthedocs.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-24.04
8+
tools:
9+
python: "3.13"
10+
jobs:
11+
pre_install:
12+
- pip install mkdocs-material
13+
14+
mkdocs:
15+
configuration: docs/mkdocs.yml

docs/assets/css/theme.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
body {
2+
cursor: default;
3+
}
4+
5+
h1 {
6+
margin-bottom: 0.5em !important;
7+
color: #4051B5 !important;
8+
}
9+
10+
div.md-main__inner {
11+
margin-top: 0;
12+
}
13+
14+
:root {
15+
--md-typeset-a-color: #30a2a9;
16+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
document.addEventListener("DOMContentLoaded", function(event) {
2+
document.querySelector(".md-search__input").addEventListener("focus", (e) => {
3+
const event = new CustomEvent("readthedocs-search-show");
4+
document.dispatchEvent(event);
5+
});
6+
});

docs/contributing/tips-for-devs.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Work on the code
2+
3+
You can add a volume from your project in `/composer/vendor/steevanb/php-parallel-processes` to work on the code:
4+
5+
```bash hs_lines="5"
6+
docker run \
7+
--rm \
8+
-it \
9+
-v $(pwd):/app \
10+
-v $(pwd):/composer/vendor/steevanb/php-parallel-processes \
11+
steevanb/php-parallel-processes:1.1.0-alpine \
12+
php /app/parallel-processes.php
13+
```
14+
15+
# Work on the documentation
16+
17+
We use readthedocs, mkdocs and Material for MkDocs.
18+
19+
Documentation is written in Markdown in [docs/](https://github.com/steevanb/php-parallel-processes/tree/readthedocs/docs).
20+
21+
See [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/) for Markdown syntax and examples.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: "Compatibility"
3+
---
4+
5+
# Compatibility
6+
7+
`php-parallel-processes` is compatible with almost every development and production environment.
8+
9+
# Installed as a Composer dependency
10+
11+
- PHP ^8.2
12+
- [symfony/console](https://symfony.com/doc/current/components/console.html) ^7.0
13+
- [symfony/process](https://symfony.com/doc/current/components/process.html) ^7.0
14+
- Linux and macOS
15+
16+
# Used with the Docker image
17+
18+
- Docker — you should already have a compatible version

docs/getting-started/license.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "License"
3+
---
4+
5+
# License
6+
7+
`php-parallel-processes` is under [Apache 2.0 license](https://github.com/steevanb/php-parallel-processes/blob/master/LICENSE).
8+
9+
The Apache 2.0 license allows you to freely use, modify, and distribute software, including for commercial purposes,
10+
as long as you keep the copyright and license notices and indicate any changes made.

docs/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "Summary"
3+
---
4+
5+
# PHP parallel processes
6+
7+
`php-parallel-processes` is an open source tool to execute processes in parallel, with these key features:
8+
9+
- Install it as a [Composer dependency](installation/composer-dependency.md) or use the [Docker images](installation/docker-image.md) to avoid installing anything
10+
- Configure your processes in PHP
11+
- Verbosity to define if you want to execute processes without showing each process output, show execution time, show only error outputs or all outputs
12+
- Configure when your process should start: immediately, wait for another process (successful, failed or terminated), bootstrap or tear down
13+
- Configure each process: name, command, max execution time, output verbosity, etc.
14+
- Choose your theme, or create your own
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: "Installation - Composer dependency"
3+
---
4+
5+
# Composer dependency
6+
7+
If you want to install `php-parallel-processses` in your project, with Composer:
8+
9+
```bash
10+
composer require steevanb/php-parallel-processes:^1.0
11+
```
12+
13+
# Available versions
14+
15+
See [releases](https://github.com/steevanb/php-parallel-processes/releases).
16+
17+
See [changelog](https://github.com/steevanb/php-parallel-processes/blob/master/changelog.md).

0 commit comments

Comments
 (0)