Just started at my new job! Exciting!
And my first mission was to deal with this React component.
We wanted to have a nice demo page on a github page for this component.
Something like this…
And it was actually fairly easy. Just had to use rackt-cli.
Once rackt-cli is installed (using npm install -g rackt-cli
), create a folder examples
at the root of your project and then everything inside this folder will be taken to a github page for your project using the command rackt pages
.
Easy right?
In my case, I copied a github page theme (index.html + javascripts folder + stylesheets folder) and then modified the index to list my different demos (basic folder + multiple folder). You can see the structure here.
N.B.: rackt-cli can also be used to build
your react component and you can preview your demo using rackt server
and… much more! Just check the documentation.