Simple, easy-to-use framework for looping CLI applications.
git clone https://github.com/matlsn/prompter.git
npm i
node index
Edit .env file using .env.example as a guideline for tweaks and settings.
const commandBase = require('../base/commandBase.js')
class Ping extends commandBase {
get name () {
return 'ping'
}
get aliases () {
return ['pong', 'pang', 'peng']
}
get description () {
return 'Pong!'
}
execute () {
this.log('Pong!', 'red')
}
}
module.exports = Ping
this.log('content', 'color')
- Logs content to console with optional color (provided by Chalk). Compatable with arrays for cleaner multi-logging.this.randInt(min, max)
- Returns a random number betweenmin
andmax
.this.randSelect([array])
- Returns a random item from an array.this.randHex()
- Returns a random hex color. Compatable withthis.log
color input.
If you are using this library in one of your projects, add it in this list. β¨