Simple boilerplate for NodeSchool workshopper
I've built three workshoppers for NodeSchool:
Unfortunately, there's no documentation for the workshopper-adventure framework. Martin Heidegger gladly helped me build a good scaffold for the learnyoubash workshopper and I use the same structure for each of my workshoppers.
This boilerplate has a few advantages:
- Simple and unified structure
- Ready for localization
- Easy to create a custom footer
- Easy to create a custom messages for solutions
- Tests for exercises
- Linting of workshopper sources
- README with nice badges
It's easy to setup your workshopper. Just go through these simple steps:
- Clone the boilerplate:
git clone git@github.com:denysdovhan/workshopper-boilerplate.git
- Remove
.git
folder:
rm -rf .git
- Find and replace all occurrences of
learnyousmth
by your workshopper's name - Find and replace all occurrences of
yourname
by your GitHub username - Initialize new repository:
git init
- Commit the scaffolded boilerplate:
git add . && git commit -m "Initial commit"
- Enable Travis CI for this
- Develop your own wokrshopper. See comments in source files for better understanding
- Clean-up
README.md
- Profit!
Take a look at my other workshoppers if you need more examples.
.
├── bin
│ └── learnyousmth Executable file, `bin` in package.json
├── exercises
│ └── hello_world Exercise folder
│ ├── en.md Exercise description
│ ├── exercise.js Entry point of exercise
│ └── solution Solution folder
│ ├── en.md Solution description
│ └── solution.js Official solution
├── i18n
│ ├── en.json Localization file
│ ├── footer Localization for footer
│ │ └── en.md Add a file for your language
│ └── troubleshooting Localization for troubleshooting
│ └── en.md Add a file for your language
├── test
│ └── hello_world Test cases for exercise
│ ├── invalid.js Invalid solution (should fail)
│ └── valid.js Valid solution (should pass)
├── utils Utils for workshopper
│ ├── diff.js Colorful diffs between attempt and solution
│ ├── problem.js Export function for creating an exercise
│ └── troubleshooting.js Utility for formatin troubleshooting message
├── .editorconfig See: http://editorconfig.org/
├── .eslintrc.json ESLint configuration (by AirBnB)
├── .gitignore
├── .npmignore
├── .travis.yml Configuration for Travis
├── index.js Creates an instance of workshopper, adds exercises
├── package.json
├── preview.png Preview image of workshopper for README.md
└── README.md This file
MIT © Denys Dovhan
Learn something with fun!
This is a simple boilerplate.
This workshopper has X exercises that cover the most important aspects of something.
- HELLO WORLD — introduction to something.
If you are on Windows, make sure you are using at least version 5.1.0 of Node.js, which provides a fix for a bug in Windows where you can't choose items in the menu.
- Node.js >=4.0.0 (>=5.1.0 for Windows)
Open your terminal and run this command:
npm install -g learnyousmth
Use sudo
if you get an EACCESS
error.
Open your terminal and run the following command:
learnyousmth
MIT © Your Name