Skip to content

Commit

Permalink
Improve readme (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Dec 15, 2023
1 parent 10cfabf commit 9a18012
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ A scenario is a JSON description of a dependency tree.

See [`scenarios/example.json`](./scenarios/example.json)

Each scenario file can contain one or more scenarios.

### Listing scenarios

A list of available scenarios can be printed with the `list` command:
Expand All @@ -30,6 +32,22 @@ A list of available scenarios can be printed with the `list` command:
packse list
```

By default, packse will search for scenarios in the current tree. You may also pass a file to read
from:

```bash
packse list scenarios/example.json
```

Each scenario will be listed with its unique identifier e.g. `example-cd797223`. This is the name of the package
that can be installed to run the scenario once it is built and published.

Each `packse` command supports reading multiple scenario files. For example, with `list`:

```bash
packse list scenarios/example.json scenarios/requires-does-not-exist.json
```

### Building scenarios

A scenario can be used to generate packages and build distributions:
Expand All @@ -41,12 +59,9 @@ packse build scenario/example.json
The `build/` directory will contain sources for all of the packages in the scenario.
The `dist/` directory will contain built distributions for all of the packages in the scenario.


When a scenario is built, it is given a unique identifier based on a hash of the scenario contents and the project
templates used to generate the packages. Each package in the scenario will include the unique identifier.

The `build` command will print the unique identifier for the scenario e.g. `example-cd797223`. A special entrypoint
package is generated for the scenario which can be used later to install the scenario.
templates used to generate the packages. Each package and requirement in the scenario will be prefixed with the
identifier.

The `PACKSE_VERSION_SEED` environment variable can be used to override the seed used to generate the unique
identifier, allowing versions to differ based on information outside of packse.
Expand Down

0 comments on commit 9a18012

Please sign in to comment.