# core/steps/chapter.step.ts

> 12 lines of code and 1 definition.

Tree: Bane's Lab Build Scripts
Language: typescript
Layer: application
Canonical: https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-steps-chapter-step-ts
Source text: https://banes-lab.com/source/build-scripts/core/steps/chapter.step.ts.txt

Listed in [core/steps](https://banes-lab.com/api/source/build-scripts/core/steps.md), after [core/steps/asset.step.ts](https://banes-lab.com/source/build-scripts/core/steps/asset.step.ts.md) and before [core/steps/diagram.step.ts](https://banes-lab.com/source/build-scripts/core/steps/diagram.step.ts.md).

## Definitions

- `run` (method_definition, line 10)

## Contained in

- [core/steps](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-steps.md)

## Uses

- [core/coordinators/chapter.coordinator.ts](https://banes-lab.com/source/build-scripts/core/coordinators/chapter.coordinator.ts.md)

## Linked from

- [core/coordinators](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-coordinators.md)

## Source

```typescript
import { renderSurfaces, surfacesKey } from "#core/coordinators/chapter.coordinator";
import { defineStep } from "#core/factories/step.factory";

defineStep({
    cache: { key: surfacesKey, outputs: ["methodology", "methodology.wiki"] },
    modes: ["build"],
    name: "chapters",
    needs: ["prune"],
    phase: "close",
    async run() {
        return { gives: {}, line: await renderSurfaces() };
    },
});
```
