workshopper-hooray

1.1.0 • Public • Published

workshopper-hooray

Build Status Coverage Status Code Climate Dependency Status

A more excessive and celebratory hooray message for workshopper modules.

It shows some random big letters of celebrations with an ascii art style.

Such ascii, much hooray!

Installation

npm install --save workshopper-hooray

workshopper-hooray requires workshopper >=1.2.1

Usage

This module is to be used as a celebratory message for completing all challenges in a workshoppper-workshop.

Example usage:

var workshopper = require('workshopper');
var path = require('path');
var hooray = require('workshopper-hooray');
 
function fpath (f) {
  return path.join(__dirname, f)
}
 
workshopper({
  name : 'example',
  title : 'Example workshop',
  subtitle : 'Learn how do a lot of awesome stuff',
  appDir : __dirname,
  menuItems   : [],
  exerciseDir : fpath('./exercises/'),
  helpFile    : fpath('help.txt'),
  onComplete: hooray
})

... or you could add your own callback to run something before or after workshopper-hooray.:

require('colors');
 
workshopper({
  name : 'example',
  title : 'Example workshop',
  subtitle : 'Learn how do a lot of awesome stuff',
  appDir : __dirname,
  menuItems   : [],
  exerciseDir : fpath('./exercises/'),
  helpFile    : fpath('help.txt'),
  onComplete: function(callback) {
    console.log('Please enjoy this complementary ascii-art');
    hooray(function() {
      // Add another colorful message to be shown afterwards.
      console.log('Hope you enjoyed that ^^'.rainbow);
      // _Always_ call the callback from the onComplete hook:
      callback();
    });
  }
})

... or if you don't want that corny randomly generated text:

  // ...
  onComplete: function(callback) {
    hooray('Good job!', callback);
  }

Readme

Keywords

Package Sidebar

Install

npm i workshopper-hooray

Weekly Downloads

7

Version

1.1.0

License

MIT

Last publish

Collaborators

  • eiriksm