Configuration

Skier is highly configurable, allowing you to tailor your build pipeline to your project's needs. This guide covers how to configure Skier, including file formats, global options, and examples.


Config File Location & Format

Skier looks for a pipeline config file at your project root. Supported formats:

You can export either an array of tasks or a function returning an array (for dynamic configs).


Example: Basic Config File

// skier.tasks.js
const { generatePagesTask, generateItemsTask, copyStaticTask } = require('skier/builtins');

module.exports = [
  generatePagesTask({
    pagesDir: 'src/pages',
    partialsDir: 'src/partials',
    outDir: 'public',
  }),
  generateItemsTask({
    itemsDir: 'src/blog',
    template: 'src/pages/blog-post.html',
    partialsDir: 'src/partials',
    outDir: 'public/blog',
  }),
  copyStaticTask({
    staticDir: 'src/static',
    outDir: 'public',
  }),
];

Global Options

Each task accepts its own config, but you can also define global variables and options that are available to all tasks and templates.


Dynamic Config Example

You can export a function for dynamic configuration:

module.exports = (env) => [
  // Tasks can be conditionally included based on env
];

Overriding Defaults

Most built-in tasks have sensible defaults, but you can override any option. See the docs for each built-in for details and examples.


Best Practices


Next: Learn more about Tasks and Built-in Tasks to customize your pipeline.