How to use the cli.ok function in cli

To help you get started, we’ve selected a few cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Treefrog / A.mphibio.us / docs / build / node_modules / grunt-contrib-jshint / node_modules / jshint / make.js View on Github external
bundle.addEntry("./src/stable/jshint.js");

	if (!test("-e", "./dist")) {
		mkdir("./dist");
	}

	echo("Building into dist/...", "\n");

	bundle.append("JSHINT = require('/src/stable/jshint.js').JSHINT;");

	[ "// " + pkg.version,
		"var JSHINT;",
		bundle.bundle()
	].join("\n").to("./dist/jshint-" + pkg.version + ".js");

	cli.ok("Bundle");

	// Rhino
	var rhino = cat("./dist/jshint-" + pkg.version + ".js", "./src/platforms/rhino.js");
	rhino = "#!/usr/bin/env rhino\n\n" + rhino;
	rhino.to("./dist/jshint-rhino-" + pkg.version + ".js");
	exec("chmod +x dist/jshint-rhino-" + pkg.version + ".js");
	cli.ok("Rhino");
	echo("\n");
};
github jshint / jshint / make.js View on Github external
bundle.bundle({}, function (err, src) {
		[
			"//" + pkg.version,
			"var JSHINT;",
			"(function () {",
			"var require;",
			src,
			"JSHINT = require('jshint').JSHINT;",
			"}());"
		].join("\n").to("./dist/jshint-" + pkg.version + ".js");

		cli.ok("Bundle");

		// Rhino
		var rhino = cat("./dist/jshint-" + pkg.version + ".js", "./src/platforms/rhino.js");
		rhino = "#!/usr/bin/env rhino\n\n" + "var window = {};" + rhino;
		rhino.to("./dist/jshint-rhino-" + pkg.version + ".js");
		chmod("+x", "dist/jshint-rhino-" + pkg.version + ".js");
		cli.ok("Rhino");
		echo("\n");
	});
};
github DefinitelyTyped / DefinitelyTyped / cli / cli-tests.ts View on Github external
var i = 0, interval = setInterval(function () {
    cli.progress(++i / 100);
    if (i === 100) {
        clearInterval(interval);
        cli.ok('Finished!');
    }
}, 50);
github simontabor / serenity / lib / converter.js View on Github external
Converter.prototype.run = function(files) {
  var self = this;
  cli.ok('Converting from Jekyll to Templr');
  self.backup(function() {
    for (var i = 0; i < files.length; i++) {
      var ext = files[i].split('.').pop();
      if (ext == 'html') {
        self.convert(files[i]);
      }
      if (files[i].substr(-11) == '_config.yml') {
        fs.readFile(files[i],'utf-8',function(err,data) {
          if (err) return cli.error('Error reading ./_config.yml');
          var json = self.convertyml(data);
          fs.writeFile('./serenity.js', 'var config = '+JSON.stringify(json,null,2)+';\n\nmodule.exports=config;', function (err) {
            if (err) return cli.error(err);
            cli.debug('Converted and saved config');
          });
        });
github simontabor / serenity / convert.js View on Github external
converter.prototype.run = function(files) {
  var self = this;
  cli.ok('Converting from Jekyll to Templr');
  self.backup(function() {
    for (var i = 0; i < files.length; i++) {
      var ext = files[i].split('.').pop();
      if (ext == 'html') {
        self.convert(files[i]);
      }
      if (files[i].substr(-11) == '_config.yml') {
        fs.readFile(files[i],'utf-8',function(err,data) {
          if (err) return cli.error('Error reading ./_config.yml');
          var json = self.convertyml(data);
          fs.writeFile('./templr.js', 'var config = '+JSON.stringify(json,null,2)+';\n\nmodule.exports=config;', function (err) {
            if (err) return cli.error(err);
            cli.debug('Converted and saved config');
          });
        });
github simontabor / serenity / convert.js View on Github external
fs.copy('./','../_templrbackup',function(err) {
    if (err) {
      cli.error(err);
      cli.fatal('Could not backup directory to ../_templrbackup');
    }
    cli.ok('Backed up directory to ../_templrbackup');
    cb();
  });
};
github AdobeXD / xdpm / commands / validate.js View on Github external
results.forEach(result => {
        if (result.ok) {
            cli.ok(result.ok);
        } else {
            cli.error(result.error);
        }
    });
github victorporof / Sublime-JSHint / scripts / node_modules / cli / examples / progress.js View on Github external
var i = 0, interval = setInterval(function () { 
    cli.progress(++i / 100); 
    if (i === 100) {
        clearInterval(interval);
        cli.ok('Finished!');
    }
}, 50);
github AdobeXD / xdpm / commands / install.js View on Github external
results.forEach(result => {
        if (result.ok) {
            cli.ok(result.ok);
        } else {
            cli.error(result.error);
        }
    });
github oklai / koala / src / app / node_modules / jshint / node_modules / cli / examples / progress.js View on Github external
var i = 0, interval = setInterval(function () { 
    cli.progress(++i / 100); 
    if (i === 100) {
        clearInterval(interval);
        cli.ok('Finished!');
    }
}, 50);