-
Notifications
You must be signed in to change notification settings - Fork 0
Development
codesplain-embedded is meant to instantiate a new React component for each html element that matches the [data-component=codesplain] selector. This means that each component must be self-contained, and state should be kept within the scope.
codesplain-embedded also must be lightweight, as it will be one of many components on a single runestone page. Keep your dependencies down and keep the project as flat as possible.
To allow the project to be independent, all dependencies are bundled in with webpack. Currently, this is unminified, however it is intended to use minifiers and Closure Compiler to make the deliverable as small as possible.
For development purposes, there is an html page and a snippet json that can be used to simulate the component in runestone. Use yarn start to create a local webpack server that will reload changes to the component live.