npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

adventure-runner

2.0.2

@hemanth

npmHomeRepoSnykSocket
Downloads:0
$ npm install adventure-runner
DailyWeeklyMonthlyYearly

adventure-runner

Runner util for nodeschool adventures.

Install

$ npm install --save adventure-runner

Usage

If you are using adventure module to create your nodeshcool adventures:

Instead of doing something like:

var adventure = require('adventure');
var shop = adventure('example-adventure');

var problems = [ 'dinosaurs', 'robots', 'wowsers' ];
problems.forEach(function (prob) {
    shop.add(prob, function () { return require('./problems/' + prob) });
});

shop.execute(process.argv.slice(2));

You could do:

var runner = require('adventure-runner');

runner('example-adventure',[ 'dinosaurs', 'robots', 'wowsers' ]);

or

var runner = require('adventure-runner');

runner('example-adventure','./problems');

API

adventureRunner(name, problems)

name

Required
Type: string

Name of your adventure.

problems

Type: stirng or array

Path to your problems or array of problems.

License

MIT © hemanth