Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eiriksm/workshopper-hooray
A more excessive and celebratory hooray message for workshopper modules.
https://github.com/eiriksm/workshopper-hooray
Last synced: 12 days ago
JSON representation
A more excessive and celebratory hooray message for workshopper modules.
- Host: GitHub
- URL: https://github.com/eiriksm/workshopper-hooray
- Owner: eiriksm
- Created: 2014-06-29T16:57:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-02-25T18:53:24.000Z (almost 6 years ago)
- Last Synced: 2024-10-30T03:30:50.273Z (2 months ago)
- Language: JavaScript
- Size: 139 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
workshopper-hooray
==================
[![Build Status](https://travis-ci.org/eiriksm/workshopper-hooray.svg?branch=master)](https://travis-ci.org/eiriksm/workshopper-hooray)
[![Coverage Status](http://img.shields.io/coveralls/eiriksm/workshopper-hooray.svg)](https://coveralls.io/r/eiriksm/workshopper-hooray?branch=master)
[![Code Climate](http://img.shields.io/codeclimate/github/eiriksm/workshopper-hooray.svg)](https://codeclimate.com/github/eiriksm/workshopper-hooray)
[![Dependency Status](https://david-dm.org/eiriksm/workshopper-hooray.svg?theme=shields.io)](https://david-dm.org/eiriksm/workshopper-hooray)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!](https://raw.githubusercontent.com/eiriksm/workshopper-hooray/master/workshop.gif)
## 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](https://github.com/rvagg/workshopper)-workshop.### Example usage:
```js
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.:
```js
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:
```js
// ...
onComplete: function(callback) {
hooray('Good job!', callback);
}
```