Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Document how to write and implement Builder plugins #287

Closed
Blackbaud-SteveBrush opened this issue May 25, 2017 · 1 comment
Closed

Document how to write and implement Builder plugins #287

Blackbaud-SteveBrush opened this issue May 25, 2017 · 1 comment
Assignees

Comments

@Blackbaud-SteveBrush
Copy link
Member

We need to document how to write and implement skyux-builder-plugin- plugins.

Here's an example plugin:
https://github.com/blackbaud/skyux-builder-plugin-stache

This pull request is related: blackbaud/skyux-builder#156

package.json

{
  "dependencies": {
    "@blackbaud/skyux-builder-plugin-stache": "^1.0.0"
  }
}

skyuxconfig.json

{
  "plugins": [
    "@blackbaud/skyux-builder-plugin-stache"
  ]
}

Plugin's index.js file:
The simplest form of a plugin would have an index.js file that includes:

module.exports = {
  // content = a string representation of the file's contents
  // resourcePath = the absolute path to the file
  // skyPagesConfig = the prepared config that includes skyuxconfig.json and builder's defaults
  preload(content, resourcePath, skyPagesConfig) {
    return content;
  };
}
@Blackbaud-SteveBrush Blackbaud-SteveBrush changed the title Document plugins feature Document how to write and implement Builder plugins Sep 6, 2017
@Blackbaud-SteveBrush Blackbaud-SteveBrush transferred this issue from blackbaud/skyux2 Feb 15, 2019
@blackbaud-johnly blackbaud-johnly removed their assignment Mar 11, 2019
@blackbaud-johnly
Copy link
Contributor

Addressed in #456.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants