How to use the ok function from cli

Find comprehensive JavaScript cli.ok code examples handpicked from public code repositorys.

87
88
89
90
91
92
93
94
95
        if (existingScope == null)
          await Scope.create({ userId: options.id, type })
      } catch (e) { console.log(e) }
    }

    cli.ok(`User with id ${options.id} made an admin` );
} else {
    cli.ok(`User with id ${options.id} does not exist`)
}
fork icon222
star icon600
watch icon40

+ 3 other calls in file

45
46
47
48
49
50
51
52
53
54
})

if (settings.display) {
  cli.info(`Total files: ${Object.keys(files).length}`)
  cli.info(`Output file created on: ${settings.dist}`)
  cli.ok('Markdown to json process has been finished!')
}

if (settings.server) {
  serveData(data, settings)
fork icon17
star icon83
watch icon3

+ 3 other calls in file

65
66
67
68
69
70
71
72
73
74
  fs.rename(file, fileName, function(err) {
    if (err) return cli.error(err)

    fs.writeFile(fileName, result, function(err) {
      if (err) return cli.error(err)
      cli.ok(file + ' successfully converted and renamed')
    })
  })
} else {
  mkdirp(path.dirname(fileName), function(err) {
fork icon11
star icon52
watch icon4

+ 7 other calls in file

28
29
30
31
32
33
34
35
36
    if (err) {
      cli.error(err);
    } else if (info) {
      cli.info(info);
    } else if (ok) {
      cli.ok(ok);
    }
  });
});
fork icon34
star icon0
watch icon2

91
92
93
94
95
96
97
98
99
100
    }
  }, function(err) {
    if (dry) {
      cli.info(matchedWords + ' words in (' + matched + ' of ' + count + ') revisions will be replaced!');
    } else {
      cli.ok(matchedWords + ' words in (' + matched + ' of ' + count + ') revisions replaced!');
    }
    return next();
  });
});
fork icon180
star icon0
watch icon11

+ 3 other calls in file

59
60
61
62
63
64
65
66
67
68
    cli.fatal(err)
  })
  config.testTargets().fail(function () {
    cli.fatal('configured target fails basic tests')
  }).done(function () {
    cli.ok('configured targets pass basic tests')
    dfrd.resolve(config)
  })
} else {
  cli.info('use `cdn-sync init` to get started')
fork icon3
star icon12
watch icon2

+ 3 other calls in file

104
105
106
107
108
109
110
111
112

var Verbose = options.verbose;
var App = args[args.length - 1]; // Last arg should be app name
var Destination = Path.join(process.cwd(), App);

Cli.ok('App Name: ' + App);
Cli.ok('App folder: ' + Destination);

Cli.info('Checking app folder ...');
fork icon0
star icon2
watch icon3

+ 3 other calls in file

104
105
106
107
108
109
110
111
112
113
            })
        }
        resolve(null)
    })))

    cli.ok(`Existing users with userRole admin converted to users with admin scope` );

    process.exit(0);
}
catch (err) {
fork icon0
star icon0
watch icon0

36
37
38
39
40
41
42
43
44
45
function chang(options) {
    options = _.extend({}, require('./defaults.js'), options);

    if (!options.release) cli.info('Missing release version');
    if (!options.github_repo) cli.info('Missing Github repository');
    cli.ok('Language chosen: ' + options.language);

    if (options.tag) {
        return getTag(options.tag).then(cb);
    } else {
fork icon0
star icon0
watch icon1

+ 3 other calls in file

27
28
29
30
31
32
33
34
35
36
var input = opts.input;
var output_directory = opts.output_directory;
var cut_file = opts.cut_file;
var clean = opts.clean;

cli.ok(('> Start: ').concat(input, ' ',output_directory, ' ', cut_file));

var details = require(cut_file);

var film_name = details.data.title;
fork icon0
star icon0
watch icon2

+ 3 other calls in file

4
5
6
7
8
9
10
11
12
13

mongoose.connect(dbURI); 
mongoose.Promise = global.Promise;

mongoose.connection.on('connected', function () {  
  cli.ok('Mongoose default connection open to ' + dbURI);
}); 

mongoose.connection.on('error',function (err) {  
  cli.error('Mongoose default connection error: ' + err);
fork icon0
star icon0
watch icon4