7173308399cbab9d57f50eb83a7e3486a6a71702
[platform/framework/web/crosswalk-tizen.git] /
1 "use strict";
2
3 var npmRun = require('npm-run').sync;
4
5 // ---
6
7 // run cli tools in series passing the stdout of previous tool as stdin of next
8 // one
9 exports.run = run;
10 function run(commands, input) {
11   if (!commands) {
12     return input;
13   }
14   return commands.reduce(function(input, cmd) {
15     return npmRun(cmd, { input: input });
16   }, input);
17 }