About this book

We built this book with GitBook and some plugins:

  • -sharing: allows to manage (ore remove at all) the sharing buttons
  • include-codeblock: allows to import a block of code directly from a file
  • include: allows to import and reuse a MD file

The book can be configured with the book.json file, some of the options can be found here.

How to use it

  • npx gitbook install: automatically managed with the postintall script
  • npm run book:serve: alias for npx storybook serve
  • npm run book:build: alias for npx storybook build, the artifact is placed into the docs directory to be used with GitHub pages. ATTENTION: you need to run npm test before it to create some assets for the book
  • npm run book:publish: pushes the latest changes to the GitHub page


We managed the slides through slides.com and are publicly available.


We leveraged both the React frontend and the Node.js backend of the RealWorld project. Read more about it in the dedicated chapter.

Cypress tests

To watch them running on your local machine:

  • you should have the RealWorld project dependencies installed
  • you must launch the RealWorld project with npm run realworld:start
  • run npm run cy:open and launch your tests of choice

Jest example tests

To watch them running on your local machine:

  • install the project dependencies with npm install
  • launch npm run test:unit
  • if you want to keep Jest opened you can launch npm run test:unit:watch and navigate the various tests leveraging the jest-watch-typeahead plugin

File system

|-- __tests__ # example tests
|-- book # all the chapters of the  book
|-- cypress/integration # all the Cypress tests
|-- demo-app # the React application used for the integration/unit tests part
|-- docs # auto-generated directory, GitHub pages points here
|-- realworld # both the frontend/backend RealWorld apps
|-- slides # the GitPitch files (if used)
|-- utils # little repository utilities

Author: Stefano Magni

results matching ""

    No results matching ""