Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d6cfb29df2
Fetching contributors…

Cannot retrieve contributors at this time

executable file 41 lines (34 sloc) 1.074 kb
#!/usr/bin/env node
// Load jessie
var jessie = require('../lib/jessie');
// Load package.json
var pkgsrc = require('fs').readFileSync(__dirname + '/../package.json');
var pkg = JSON.parse(pkgsrc)
// Enable cli and set version name based on package.json
var cli = require('cli').enable('version');
cli.setApp(pkg.name, pkg.version)
cli.setUsage('jessie [OPTIONS] [spec dirs/files]')
cli.parse({
format: ['f', 'Output format to use', 'string', 'progress']
}, null);
process.on('uncaughtException', function (err) {
var ansi = require('../lib/jessie/ansi')
console.log(ansi.red + "Jessie failed to start. Here's some info about the problem:"+ansi.none)
console.log(err.stack);
});
// Main loop
cli.main(function(args, options) {
if (args.length == 0) {
require('util').puts(cli.getUsage())
process.exit(1)
}
jessie.run(args, options, function(fail) {
if (process.stdout.bufferSize > 0) {
process.stdout.on('drain', function() {
process.exit(fail ? 1 : 0)
})
} else {
process.exit(fail ? 1 : 0)
}
})
})
Jump to Line
Something went wrong with that request. Please try again.