Closed
Description
I believe It’s possible to build both a VSCode and web compatible standard for tutorials. You could write the tutorial once and run in as a web “railshooter” style walkthrough, and on vscode with CodeRoad.
Tutorials are stored in commits and markdown
- A setup commit + markdown
- A solution commit
- B setup commit + markdown
- B solution commit
For web, you could generate a page with content and tests by stopping at steps 1 and 3 and generating a build for each.
Benefits include:
- Reduced duplication across code for each page
- Testable verification of unit tests and a solution in the build process. You can demonstrate that changing code at step A does not break later steps.
- Can run on two platforms with a single build tool
How a build could work
- Capture the list of commits from markdown in order. Run tests using git by cherry-picking commit by commit and running processes.
- At each step setup, generate the boilerplate required for a static web page (markdown, cumulative commit code)
- At each step solution, run unit tests to ensure tests pass, otherwise fail with a clear error message
How to edit
Editing can be managed the same as in CodeRoad:
- Checkout a new branch (eg “v1.21”)
- Interactive rebase to make changes
- Run tests
- Add the new branch name to the markdown file