Skip to content

Commit

Permalink
swap out the term "generate"
Browse files Browse the repository at this point in the history
  • Loading branch information
midzdotdev committed Nov 7, 2024
1 parent 39611a0 commit f6083be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Path Master provides a whole host of benefits:
- 🧬 **Consistent:** standardises your path generation

> This library does not modify any filesystem directly,
> it's solely for modelling and generating paths.
> it's solely for modelling and getting paths.
It can be used anywhere paths are used, such as:

Expand Down Expand Up @@ -116,7 +116,7 @@ Make sure to install the `@midzdotdev/path-master` package from [JSR](https://js

## Conceptualising Models

In order to generate paths, we need to model the shape of our file structure. Before diving straight into the code, let's make sure we understand this kind of modelling as a concept.
In order to get paths, we need to model the shape of our file structure. Before diving straight into the code, let's make sure we understand this kind of modelling as a concept.

As an example, we're going to be modelling a collection of HTTP Live Streaming (HLS) video packages.

Expand All @@ -140,7 +140,7 @@ Notice the square brackets above (`[]`), where we've parameterised the parts of

The name of the `videos` directory is static so there will only be one, but there could be any number of directories within `videos` because of the parameterised `[videoId]` part. The same idea applies to the `master.m3u8` and `segment_[segmentId].ts` files.

In `path-master`, these parameters are referred to as _dependencies_ and are always named so that when we generate paths, we know what value to use for each parameterised part of the path.
In `path-master`, these parameters are referred to as _dependencies_ and are always named so we know which values to use when forming a path.

The following table gives us some examples of concrete paths for different nodes in the tree, each with the required dependencies.

Expand Down Expand Up @@ -209,7 +209,7 @@ Ideally a model should fully describe the structure of a storage destination. Th

Now that we have a model, let's address the reason that we're here in the first place! Let's get some paths.

We can generate paths by calling the `getPath` function.
We can get the path to a node by calling the `getPath` function.

```ts
declare const getPath: (
Expand Down
4 changes: 2 additions & 2 deletions src/types/multi-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ type _getKeypaths<
* Collects the dependencies of a node (specified by its keypath) all the way
* from the root.
*
* Dependencies are the data required to generate the path of a node, and are
* defined with as an object type.
* Dependencies are the data required to get the path of a node, and are defined
* as an object of strings to values.
*
* @example
* import { dir, file, collectDependencies } from '@midzdotdev/path-master'
Expand Down

0 comments on commit f6083be

Please sign in to comment.