How to use the @s-ui/helpers/cli.spawnList function in @s-ui/helpers

To help you get started, we’ve selected a few @s-ui/helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SUI-Components / sui / packages / sui-mono / bin / sui-mono-link.js View on Github external
const linkingMap = dependenciesMap.reduce((obj, [path, deps]) => {
  const name = packagesNames[packagesPaths.indexOf(path)]
  if (name) {
    obj[name] = {name, path, deps}
  }
  return obj
}, {})

const createCommandsForMap = createCommands(linkingMap)
const commands = Object.values(linkingMap).reduce(
  (res, pkg) => [...res, ...createCommandsForMap(pkg)],
  []
)

// Execute commands
spawnList(commands, {}, 10)
  .then(process.exit)
  .catch(process.exit)