UNPKG

collider.jam

Version:

Hand-crafted and fun to use game framework for jamming, creative coding, and rapid game development

18 lines (14 loc) 408 B
'use strict' const fs = require('fs-extra') const log = require('./log') const env = require('./env') module.exports = function(topic) { topic = topic || 'help' try { const content = fs.readFileSync(`${env.jamPath}/res/${topic}.txt`) const text = content.toString('utf-8') log.raw(text.trim()) } catch (e) { log.error(`unable to find topic [${topic}]`) } }