UNPKG

generator-clam

Version:
51 lines (38 loc) 994 B
// 'use strict'; var util = require('util'); var path = require('path'); var ClamLogo = require('../app/logo').ClamLogo; var yeoman = require('yeoman-generator'); var ABC = require('abc-generator'); var AppGenerator = module.exports = function AppGenerator(args, options, config) { // yeoman.generators.Base.apply(this, arguments); ABC.UIBase.apply(this, arguments); console.log(yellow('TODO !')); this.on('end', function () { console.log(yellow('TODO !')); }.bind(this)); }; util.inherits(AppGenerator, ABC.UIBase); AppGenerator.prototype.askFor = function askFor() { var cb = this.async(); // welcome message console.log(ClamLogo(this)); }; function consoleColor(str,num){ if (!num) { num = '32'; } return "\033[" + num +"m" + str + "\033[0m" } function green(str){ return consoleColor(str,32); } function yellow(str){ return consoleColor(str,33); } function red(str){ return consoleColor(str,31); } function blue(str){ return consoleColor(str,34); }