Skip to content

Support incremental reruns #5

Description

@aleclarson

Currently, jumpgen has a store object for preserving arbitrary data between runs. When combined with the changes array, you can manually determine which data in your store has been invalidated, allowing you to know which parts of your generator need to be rerun.

With a new API, we could make this less of a hassle.

  • Add task function that takes a name string and a callback.
  • When a task starts and ends, a "task:start" or "task:end" event is emitted with the task name.
  • Any paths watched from within a task's callback will only invalidate that task when changed.
  • When your generator reruns, some tasks may not rerun and instead will return a memoized result, if nothing they watched has changed.
  • Optionally, you can specify that a task's result should be stored in a filesystem cache, rather than kept in memory. (This feature won't exist in the initial implementation)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plannedThis will be added at some point. PR welcome

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions