Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[api] ui: add simple alias to jitsu-ui.
  • Loading branch information
chjj committed Mar 21, 2013
1 parent 17601a9 commit c1db7d7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions 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.