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

Function buildSandboxMenuItemFile

projects/cli/src/build-sandboxes.ts:158–166  ·  view source on GitHub ↗
(sandboxes: SandboxFileInformation[])

Source from the content-addressed store, hash-verified

156}
157
158export async function buildSandboxMenuItemFile(sandboxes: SandboxFileInformation[]) {
159 const content = new StringBuilder();
160 content.addLine(`function getSandboxMenuItems() {`);
161 content.addLine(`return ${JSON.stringify(sandboxes)};`);
162 content.addLine(`}`);
163 content.addLine('exports.getSandboxMenuItems = getSandboxMenuItems;');
164
165 await writeSandboxContent(SANDBOX_MENU_ITEMS_FILE, content.dump());
166}
167
168// Turns windows URL string ('c:\\etc\\') into URL node expects ('c:/etc/')
169// https://github.com/sindresorhus/slash

Callers 1

buildSandboxesFunction · 0.85

Calls 3

addLineMethod · 0.95
dumpMethod · 0.95
writeSandboxContentFunction · 0.85

Tested by

no test coverage detected