MCPcopy Index your code
hub / github.com/SoCreate/angular-playground / buildSandboxes

Function buildSandboxes

projects/cli/src/build-sandboxes.ts:20–36  ·  view source on GitHub ↗
(srcPaths: string[], chunk: boolean, makeSandboxMenuItemFile: boolean, definedSandboxesPath: string)

Source from the content-addressed store, hash-verified

18}
19
20export async function buildSandboxes(srcPaths: string[], chunk: boolean, makeSandboxMenuItemFile: boolean, definedSandboxesPath: string): Promise<string[]> {
21 const chunkMode = chunk ? 'lazy' : 'eager';
22 const homes = srcPaths.map(srcPath => resolvePath(srcPath));
23 const sandboxes = findSandboxes(homes);
24
25 if (makeSandboxMenuItemFile) {
26 await buildSandboxMenuItemFile(sandboxes);
27 }
28 const rootPath = resolvePath(definedSandboxesPath);
29 if (!existsSync(rootPath)) {
30 mkdirSync(rootPath);
31 }
32 return await buildSandboxFileContents(rootPath, sandboxes, chunkMode, writeSandboxContent).then(results => {
33 console.log('Successfully compiled sandbox files.');
34 return results;
35 });
36}
37
38export function findSandboxes(homes: string[]): SandboxFileInformation[] {
39 const sandboxes = [];

Callers 1

runFunction · 0.90

Calls 3

findSandboxesFunction · 0.85
buildSandboxMenuItemFileFunction · 0.85
buildSandboxFileContentsFunction · 0.85

Tested by

no test coverage detected