prepareOutputTask

Initialize the output directory before building.


When to Use

✅ Use prepareOutputTask as the first task in your pipeline to:


Quick Start

prepareOutputTask({ outDir: 'public' })

Configuration

Option Type Required Description
outDir string Output directory path

Why It's Important

Without this task:

Always place first in your pipeline:

export default [
  prepareOutputTask({ outDir: 'public' }),  // ← First!
  setGlobalsTask({ /* ... */ }),
  generatePagesTask({ /* ... */ }),
  // ...
];

Related Tasks