Skip to content

Custom build flags #3803

@lachlanjc

Description

@lachlanjc

First, using Gatsby for Hack Club has been amazing. Already built 2 other sites with it and I just love it, so thank you! 💟

I have an idempotent build step (generating background images based on an input) that runs onCreateNode in my gatsby-node.js. However, I'd like to just run it occasionally, and keep the resulting files committed. I could write a separate script using fs to find the right directories and do this, but having it tied to the Gatsby build is radically easier.

Essentially, I'd like to be able to pass custom flags on build (gatsby build --generate-patterns or something). When I try that now, Gatsby refuses to run at all. Is there a good alternative/would you be interested in this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions