install.d.ts 738 B

12345678910111213141516171819202122
  1. export declare type PackageManager = 'npm' | 'pnpm' | 'yarn';
  2. interface InstallArgs {
  3. /**
  4. * Indicate whether to install packages using npm, pnpm or Yarn.
  5. */
  6. packageManager: PackageManager;
  7. /**
  8. * Indicate whether there is an active Internet connection.
  9. */
  10. isOnline: boolean;
  11. /**
  12. * Indicate whether the given dependencies are devDependencies.
  13. */
  14. devDependencies?: boolean;
  15. }
  16. /**
  17. * Spawn a package manager installation with either Yarn or NPM.
  18. *
  19. * @returns A Promise that resolves once the installation is finished.
  20. */
  21. export declare function install(root: string, dependencies: string[] | null, { packageManager, isOnline, devDependencies }: InstallArgs): Promise<void>;
  22. export {};