chore(scripts): add .js suffix for better Prettier/ESLint integration
This commit is contained in:
Executable
+25
@@ -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
|
||||
}
|
||||
})
|
||||
})
|
||||
)
|
||||
Reference in New Issue
Block a user