MCPcopy Index your code
hub / github.com/angular/angular-cli / createProjectFromAsset

Function createProjectFromAsset

tests/e2e/utils/assets.ts:47–65  ·  view source on GitHub ↗
(
  assetName: string,
  useNpmPackages = false,
  skipInstall = false,
)

Source from the content-addressed store, hash-verified

45 * to use the local NPM registry.
46 * */
47export async function createProjectFromAsset(
48 assetName: string,
49 useNpmPackages = false,
50 skipInstall = false,
51): Promise<() => Promise<void>> {
52 const dir = await copyAssets(assetName);
53 process.chdir(dir);
54
55 await setRegistry(!useNpmPackages /** useTestRegistry */);
56
57 if (!useNpmPackages) {
58 await useBuiltPackagesVersions();
59 }
60 if (!skipInstall) {
61 await installWorkspacePackages();
62 }
63
64 return () => setRegistry(true /** useTestRegistry */);
65}
66
67export function getTestAssetsDir(): string {
68 return join(getGlobalVariable('projects-root'), 'assets');

Calls 4

setRegistryFunction · 0.90
useBuiltPackagesVersionsFunction · 0.90
installWorkspacePackagesFunction · 0.90
copyAssetsFunction · 0.70

Tested by

no test coverage detected