| 205 | gulp.task('checkDependencies', gulp.series('checkNativeDependencies', 'checkNpmDependencies')); |
| 206 | |
| 207 | function spawnAsync(command, args) { |
| 208 | return new Promise((resolve, reject) => { |
| 209 | let stdOut = ''; |
| 210 | console.info(`> ${command} ${args.join(' ')}`); |
| 211 | const proc = spawn(command, args, { cwd: __dirname, env: process.env }); |
| 212 | proc.stdout.on('data', (data) => { |
| 213 | // Log output on CI (else travis times out when there's not output). |
| 214 | stdOut += data.toString(); |
| 215 | if (isCI) { |
| 216 | console.log(data.toString()); |
| 217 | } |
| 218 | }); |
| 219 | proc.stderr.on('data', (data) => { |
| 220 | console.error(data.toString()); |
| 221 | }); |
| 222 | proc.on('close', () => resolve(stdOut)); |
| 223 | proc.on('error', (error) => reject(error)); |
| 224 | }); |
| 225 | } |
| 226 | |
| 227 | function hasNativeDependencies() { |
| 228 | let nativeDependencies = nativeDependencyChecker.check(path.join(__dirname, 'node_modules')); |