How to use the @instructure/command-utils.runCommandAsync function in @instructure/command-utils

To help you get started, we’ve selected a few @instructure/command-utils 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 instructure / instructure-ui / packages / ui-scripts / lib / utils / npm.js View on Github external
if (semver.prerelease(bumpVersion)) {
      args.push('--exact')
    }
  }

  if (process.env.CI) {
    args.push('--yes')
  }

  info(`📦  Bumping ${packageName} packages and generating changelogs...`)

  let releaseVersion

  try {
    await runCommandAsync('lerna', [
      'version',
      ...args,
      '--include-merged-tags',
      '--no-push',
      '--no-git-tag-version',
      '--force-publish=*',
      '--conventional-commits'
    ])

    releaseVersion = await syncRootPackageVersion(true)

    info(`📦  Done bumping ${packageName} to ${releaseVersion}!`)
  } catch (err) {
    error(err)
    process.exit(1)
  }
github instructure / instructure-ui / packages / ui-scripts / lib / tag.js View on Github external
return Promise.all(getPackages().map(async pkg => {
    if (pkg.private) {
      info(`${pkg.name} is private.`)
    } else {
      const toTag = `${pkg.name}@${versionToTag}`
      info(`📦  Running 'dist-tag ${command} ${toTag} ${tag}'...`)
      try {
        await runCommandAsync('npm', ['dist-tag', command, toTag, tag])
      } catch (err) {
        error(err)
      }
      info(`📦  ${toTag} tags were successfully updated!`)
    }
  }))
}
github instructure / instructure-ui / packages / ui-scripts / lib / link-packages.js View on Github external
return Promise.all(usedPackages.map(async pkg => {
    if (linkCommand === 'link') {
      await runCommandAsync('lerna', ['exec', '--scope', pkg.name, '--', 'yarn', linkCommand])
    }
    await runCommandAsync('yarn', [linkCommand, pkg.name, '--cwd', appDir])
    info(`${linkCommand}ing ${pkg.name} in ${appDir}`)
  }))
}
github instructure / instructure-ui / packages / ui-scripts / lib / link-packages.js View on Github external
return Promise.all(usedPackages.map(async pkg => {
    if (linkCommand === 'link') {
      await runCommandAsync('lerna', ['exec', '--scope', pkg.name, '--', 'yarn', linkCommand])
    }
    await runCommandAsync('yarn', [linkCommand, pkg.name, '--cwd', appDir])
    info(`${linkCommand}ing ${pkg.name} in ${appDir}`)
  }))
}

@instructure/command-utils

Node CLI utilities made by Instructure Inc.

MIT
Latest version published 2 days ago

Package Health Score

84 / 100
Full package analysis

Similar packages