當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript execa.default函數代碼示例

本文整理匯總了TypeScript中execa.default函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript default函數的具體用法?TypeScript default怎麽用?TypeScript default使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了default函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: execa

 skipOnWindows(plugin, async () => {
   const cwd = path.join(__dirname, '../../tmp/plugin', plugin)
   await fs.remove(cwd)
   const pkg = await readPkg(path.join(__dirname, '../../node_modules', plugin, 'package.json'))
   await execa('git', ['clone', pkg.repository.url.split('+')[1], cwd])
   const opts = {cwd, stdio: [0, 1, 2]}
   await execa('git', ['checkout', `v${pkg.version}`], opts)
   await execa('yarn', [], opts)
   await execa('yarn', ['test'], opts)
 })
開發者ID:jimmyurl,項目名稱:cli,代碼行數:10,代碼來源:plugin.test.ts

示例2: main

async function main() {
  for (const zoom of range(minzoom, maxzoom + 1)) {
    const mbtilesZoom = `${name}-z${zoom}.mbtiles`
    const args = [
      '--output=' + mbtilesZoom,
      '--force',
      '--minimum-zoom=' + zoom,
      '--maximum-zoom=' + zoom,
      '--full-detail=' + (16 - zoom + 16),
      '--no-line-simplification',
      '--no-feature-limit',
      '--no-tile-size-limit',
      '--no-polygon-splitting',
      '--no-clipping',
      '--no-duplication',
      name + ext
    ]
    if (verbose) { console.log('Args', args) }
    if (verbose) { console.log('Starting zoom', zoom) }
    await execa('tippecanoe', args)
    if (verbose) { console.log('Finished zoom', zoom) }
    await execa.shell(`sqlite3 ${mbtilesZoom} .dump >> ${name}.dump`)
    if (verbose) { console.log('Dumped', mbtilesZoom) }
    await execa.shell(`rm ${mbtilesZoom}`)
    if (verbose) { console.log('Removed', mbtilesZoom) }
  }
  // Clean
  await execa.shell(`sqlite3 ${name}.mbtiles < ${name}.dump`)
  if (verbose) { console.log('Merge dump') }
  await execa.shell(`rm -f ${name}.dump`)
  if (verbose) { console.log('Removed dump') }
  console.log('All Done! :)')
}
開發者ID:osmottawa,項目名稱:imports,代碼行數:33,代碼來源:create-mbtiles.ts

示例3: LintFailure

task: () =>
  execa('tslint', [...process.argv.slice(2), '--project', project.tsConfigPath], {
    cwd: project.directory,
    env: chalk.enabled ? { FORCE_COLOR: 'true' } : {},
    stdio: ['ignore', 'pipe', 'pipe'],
  }).catch(error => {
    throw new LintFailure(project, error);
  }),
開發者ID:Jaaess,項目名稱:kibana,代碼行數:8,代碼來源:run_tslint_cli.ts

示例4: execa

 useSpinner<void>(`Saving version ${version} to package.json`, async () => {
   changeCwdToGrafanaUi();
   await execa('npm', ['version', version]);
   changeCwdToGrafanaUiDist();
   const pkg = require(`${process.cwd()}/package.json`);
   pkg.version = version;
   await savePackage({ path: `${process.cwd()}/package.json`, pkg });
 })();
開發者ID:johntdyer,項目名稱:grafana,代碼行數:8,代碼來源:grafanaui.release.ts

示例5: ProjectFailure

task: () =>
  execa(cmd, getArgs(project), {
    cwd: project.directory,
    env: chalk.enabled ? { FORCE_COLOR: 'true' } : {},
    stdio: ['ignore', 'pipe', 'pipe'],
  }).catch(error => {
    throw new ProjectFailure(project, error);
  }),
開發者ID:austec-automation,項目名稱:kibana,代碼行數:8,代碼來源:exec_in_projects.ts

示例6: async

  getRoot: async (cwd: Path): Promise<Path | null | undefined> => {
    try {
      const result = await execa('hg', ['root'], {cwd, env});

      return result.stdout;
    } catch (e) {
      return null;
    }
  },
開發者ID:elliottsj,項目名稱:jest,代碼行數:9,代碼來源:hg.ts

示例7: execa

  getRoot: async cwd => {
    try {
      const result = await execa('hg', ['root'], {cwd, env});

      return result.stdout;
    } catch (e) {
      return null;
    }
  },
開發者ID:Volune,項目名稱:jest,代碼行數:9,代碼來源:hg.ts

示例8: async

const findChangedFilesUsingCommand = async (
  args: Array<string>,
  cwd: Config.Path,
): Promise<Array<Config.Path>> => {
  const result = await execa('git', args, {cwd});

  return result.stdout
    .split('\n')
    .filter(s => s !== '')
    .map(changedPath => path.resolve(cwd, changedPath));
};
開發者ID:facebook,項目名稱:jest,代碼行數:11,代碼來源:git.ts

示例9: execa

  getRoot: async cwd => {
    const options = ['rev-parse', '--show-cdup'];

    try {
      const result = await execa('git', options, {cwd});

      return path.resolve(cwd, result.stdout);
    } catch (e) {
      return null;
    }
  },
開發者ID:facebook,項目名稱:jest,代碼行數:11,代碼來源:git.ts


注:本文中的execa.default函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。