universalviewer
universalviewer copied to clipboard
Added Storybook using JSX with UV demos
trafficstars
Support for Storybook using the HTML preset and JSX-DOM for rendering the HTML using JSX.
- Requires dist folder to exist, so you need to run
npm buildfirst - Can be started using
npm run storybook - Will watch for changes in the UV, so can be used to develop it
- HTML file for pulling in extra resources
- Mounts the contents of
./distso you can access configs and resources in that folder βΒ before we switch that over the webpack too. - Added "Knobs" add-on and hooked it up to the UV demo to switch out the Manifest and Canvas. Could be useful for building simple configuration editing examples.
- Added JSX support to TS configuration, along with JSX-DOM. When you construct a JSX element, the return value is a
HTMLElementthat can be immediately attached. (not React) - Stories can be found in
./stories/and can pull in files, classes from../srcrelative to that folder. - JS files that change may not be picked up when, such as jQuery plugins or
libfolder. You'll have to restart to see these changes.
Mostly a baseline, I wanted to get the minimum configuration in, plenty more could be added for theming, add-ons and showcasing various other UI elements in isolation.
@demiankatz I was having some problems with the files being gitignored! Looks like the storybook config isn't there. Let me change that now π