Skip to content
Permalink
Browse files

[api] ui: add simple alias to jitsu-ui.

  • Loading branch information...
chjj committed Mar 21, 2013
1 parent 17601a9 commit c1db7d7121431b6c943132fef01ce0bae2aed227
Showing with 33 additions and 0 deletions.
  1. +33 −0 lib/jitsu/commands/ui.js
@@ -0,0 +1,33 @@
/*
* ui.js: Simple alias to jitsu-ui.
*
* (C) 2012, Nodejitsu Inc.
*
*/

module.exports = function (callback) {
var spawn = require('child_process').spawn;

process.stdin.pause();

//
// TODO: Do some more searching here.
//
var ps = spawn('jitsu-ui', process.argv.slice(3), {
cwd: process.cwd(),
env: process.env,
setsid: false,
customFds: [0, 1, 2]
});

ps.on('exit', function (code) {
process.stdin.resume();
return callback();
});
};

module.exports.usage = [
'Runs jitsu-ui if installed.',
'',
'jitsu ui',
];

0 comments on commit c1db7d7

Please sign in to comment.
You can’t perform that action at this time.