How to use the pacote.tarball function in pacote

To help you get started, we’ve selected a few pacote 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 expo / expo-cli / packages / xdl / src / Exp.ts View on Github external
export async function extractTemplateAppAsync(
  templateSpec: PackageSpec,
  targetPath: string,
  config: AppJSONConfig | BareAppConfig
) {
  let tarStream = await, {
    cache: path.join(UserSettings.dotExpoHomeDirectory(), 'template-cache'),
  await fs.mkdirp(targetPath);
  await new Promise((resolve, reject) => {
    const extractStream = tar.x({
      cwd: targetPath,
      strip: 1,
      // TODO(ville): pending
      // @ts-ignore property missing from the type definition
      transform: createFileTransform(config),
      onentry(entry: ReadEntry) {
        if ( {
          // Rewrite paths for bare workflow
          entry.path = entry.path


JavaScript package downloader

Latest version published 2 months ago

Package Health Score

95 / 100
Full package analysis