collider.jam
Version:
Hand-crafted game framework for jamming, creative coding and rapid indie game development
18 lines (14 loc) • 408 B
JavaScript
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.jamHome}/res/${topic}.txt`)
const text = content.toString('utf-8')
log.raw(text.trim())
} catch (e) {
log.error(`unable to find topic [${topic}]`)
}
}