UNPKG

@develephant/corona-html5-builder

Version:

A CLI tool to easily build, watch, and debug your Corona HTML5 projects.

55 lines (49 loc) 1.19 kB
//----------------------------------------------------------------------------- // Corona HTML5 Builder // (c)2018 C. Byerley (develephant) //----------------------------------------------------------------------------- const path = require('path') //colors const clr = require('colors/safe') clr.setTheme({ ok: ['bold', 'green'], log: 'cyan', info: ['bold', 'blue'], warn: ['bold', 'yellow'], err: ['bold', 'red'], title: ['bold', 'red', 'bgBlack'], fun: 'rainbow' }) //styling function dashes(amt=80) { console.log(clr.dim('-'.repeat(amt))) } //colors direct module.exports.clr = clr //pretty print module.exports.pp = { ok: function(str) { console.log(clr.ok(`\xBB ${str}`)) }, info: function(str) { console.log(clr.info(`\xBB ${str}`)) }, warn: function(str) { console.log(clr.warn(`\xBB ${str}`)) }, err: function(str) { console.log(clr.err(`\xBB ${str}`)) }, log: function(str) { console.log(clr.log(`\xBB ${str}`)) }, title: function() { console.log(clr.title('\xBB Welcome to Corona HTML5 Builder \xAB')) }, fun: function(str) { console.log(clr.fun(str)) }, dashes: function(amt) { dashes(amt) } }