Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Welcome message finished

  • Loading branch information...
commit 0c075b9c1bbb09cee8243c8ceb24adb9fbc2a45f 1 parent 16387ef
@pksunkara authored
Showing with 11 additions and 11 deletions.
  1. +11 −11 index.js
View
22 index.js
@@ -12,7 +12,7 @@ var cliOk = exports = module.exports;
cliOk.name = 'cli-ok';
cliOk.attach = function (options) {
- var app = this, logger;
+ var app = this;
options = options || {};
if (!app.plugins.cli) {
@@ -20,15 +20,6 @@ cliOk.attach = function (options) {
}
var start = app.start;
- // var init = app.init;
-
- // app.init = function (options, cb) {
- // init(options || {}, function (err) {
- // app.log.info('Welcome to ' + app.name.grey);
- // app.log.info('It worked if it ends with ' + app.name.grey + ' ok'.green.bold);
- // cb(err);
- // });
- // };
app.start = function (options, cb) {
if (!cb && typeof options == 'function') {
@@ -39,7 +30,7 @@ cliOk.attach = function (options) {
start(options || {}, function (err) {
if (cb) return cb(err);
if (err) {
- app.log.info(app.name.grey + ' ' + 'not ok'.red.bold);
+ app.log.info(app.name.grey + ' ' + 'not'.red.bold + ' ' + 'ok'.red.bold);
} else {
app.log.info(app.name.grey + ' ' + 'ok'.green.bold);
}
@@ -47,3 +38,12 @@ cliOk.attach = function (options) {
};
};
+
+cliOk.init = function (done) {
+ var app = this;
+
+ app.log.info('Welcome to ' + app.name.grey);
+ app.log.info('It worked if it ends with ' + app.name.grey + ' ' + 'ok'.green.bold);
+
+ done();
+};
Please sign in to comment.
Something went wrong with that request. Please try again.