Giter Club home page Giter Club logo

stencil-storybook's Introduction

Built With Stencil

Stencil 2.5.2 + Storybook 6.2.9 + Real Stencil HMR*

DEMO Storybook on gh-pages | *hot module reloading

This is a starter project for building components with Stencil in Storybook. This sample includes Real HMR in Storybook, with the Stencil build running in watch mode. Storybook only knows the stories, markup of stencil and entry point.

Aswell its chromatic tested, this means visiual regression testing of your stories.

Thanks to stencil storybook starters bjankord, elwynelwyn
And shoelace where i got the proxy hmr solution.

And maybe this issue can be closed?

✔️ NodeJS 14.13.1 ready (use nvm!)
✔️ Stencil 2 ready, not yet es5 tested but should work! + BEM and REM utils
✔️ Storybook 6+ WebComponents ready
✔️ Real HMR on development with Stencil Dev Server, this keep storybooks state of controls
✔️ chromatic.com visiual regression testing ready
✔️ Tested on Windows 10 and Mac 10.15.6
✔️ Bootstrap reset and Webfonts boilerplate included

How the HMR works

Stencil has an included /~dev-server which can out of the box HMR. So we start storybook with webpack and stencil dev mode with rollup. On the top we have a proxy which include the /~dev-server of stencil into the storybook canvas iframe.html Et voilà, this is what we want!

When you have issues, please let me know!

Use my issues section

Start to develop

npm install
npm start
your storybook will run under: http://localhost:3000

Build your production

npm build

Test your Stencil

npm test
npm test -t special.spec.ts

That's it!
Cheers dutscher

stencil-storybook's People

Contributors

dutscher avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.