Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new plugins definition syntax #82

Closed
wants to merge 3 commits into from
Closed

feat: new plugins definition syntax #82

wants to merge 3 commits into from

Conversation

ubermanu
Copy link
Owner

@ubermanu ubermanu commented Sep 12, 2023

plugins should return a more complex interface

export interface Plugin {
  /** The name of the plugin. */
  name: string

  /** The build function that is called when the plugin is executed. */
  build: (context: PluginContext) => MaybePromise<void>

  watcherConfig?: {
    /** The files to reload if the right counterpart matches a changed file. If the key is '*', the whole page is reloaded. */
    reload?: {
      [file: string]: string | RegExp | Array<string | RegExp>
    }
  }
}

@ubermanu ubermanu marked this pull request as draft September 12, 2023 09:32
@ubermanu ubermanu closed this Sep 18, 2023
@ubermanu ubermanu deleted the plugin-v2 branch September 19, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant