# core/steps/asset.step.ts

> 15 lines of code and 2 definitions.

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

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

## Definitions

- `run` (method_definition, line 11)
- `{ bytes, count }` (lexical_declaration, line 13)

## Contained in

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

## Uses

- [configuration/strings/asset.strings.ts](https://banes-lab.com/source/build-scripts/configuration/strings/asset.strings.ts.md)

## Linked from

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

## Source

```typescript
import { defineStep } from "#core/factories/step.factory";
import { pruneLine } from "#configuration/strings/asset.strings";
import { pruneOutput } from "#core/persistence/asset.persistence";

defineStep({
    cache: null,
    modes: ["build"],
    name: "prune",
    needs: ["prerender"],
    phase: "close",
    async run(state) {
        await Promise.resolve();
        const { bytes, count } = pruneOutput(state.outDir);
        return { gives: {}, line: pruneLine(count, bytes) };
    },
});
```
