code-show is a command-line tool for code presentation.
It works best on a project with meaningful commits where each commit represents the next code example.
By typing next
, code-show will checkout the next commit for you.
(It will also inform you about your current and next commit)
By using this tool you can focus on your presentation rather than having to manually switch between code examples.
I was doing a talk on APIs at London Node.js User Group and was using a bash script for checking out specific git commits for my code demo part.
As it turned out, people were more interested in the "next" script rather than API documentations :)
The current version of code-show will throw away your local changes.
It is using git checkout
with the --force
command.
Please make sure you are using this tool for presentation purposes only.
npm i code-show -g
// checkout your demo source code to a folder
// eg.: git clone git@github.com:lazlojuly/my-demo-app.git
cd my-demo-app
code-show
Commands:
- Type "next" for next commit
- Type "help" for list of commands
- Type "exit" to exit at current commit