chore(scripts): add .js suffix for better Prettier/ESLint integration

This commit is contained in:
Julien Fontanet
2022-04-08 14:14:41 +02:00
parent 6b8a345241
commit 23189ed8f9
7 changed files with 6 additions and 6 deletions
Executable
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env node
'use strict'
const { fromEvent } = require('promise-toolbox')
const { spawn } = require('child_process')
const { getPackages } = require('./utils')
require('exec-promise')(([command, ...args]) =>
getPackages().forEach(({ dir, name }) => {
console.log('*', name)
return fromEvent(
spawn(command, args, {
cwd: dir,
stdio: 'inherit',
}),
'exit'
).then(code => {
if (code !== 0) {
throw code
}
})
})
)