Skip to content

denysdovhan/workshopper-boilerplate

Repository files navigation

workshopper-boilerplate

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

How to setup

It's easy to setup your workshopper. Just go through these simple steps:

  1. Clone the boilerplate:
git clone git@github.com:denysdovhan/workshopper-boilerplate.git
  1. Remove .git folder:
rm -rf .git
  1. Find and replace all occurrences of learnyousmth by your workshopper's name
  2. Find and replace all occurrences of yourname by your GitHub username
  3. Initialize new repository:
git init
  1. Commit the scaffolded boilerplate:
git add . && git commit -m "Initial commit"
  1. Enable Travis CI for this
  2. Develop your own wokrshopper. See comments in source files for better understanding
  3. Clean-up README.md
  4. Profit!

Take a look at my other workshoppers if you need more examples.

Workshopper structure

.
├── 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

License

MIT © Denys Dovhan




learnyousmth

learnyousmth

NPM version node Build Status Dependency Status

Learn something with fun!

This is a simple boilerplate.

Exercises

This workshopper has X exercises that cover the most important aspects of something.

  • HELLO WORLD — introduction to something.

Requirements

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)

Installation

Open your terminal and run this command:

npm install -g learnyousmth

Use sudo if you get an EACCESS error.

Usage

Open your terminal and run the following command:

learnyousmth

License

MIT © Your Name

Releases

No releases published

Packages

No packages published