MCPcopy Index your code
hub / github.com/code-pushup/cli / generateWorkspaceAndProject

Function generateWorkspaceAndProject

testing/test-nx-utils/src/lib/utils/nx.ts:40–63  ·  view source on GitHub ↗
(
  options:
    | string
    | (Omit<Partial<LibraryGeneratorSchema>, 'name'> & {
        name: string;
      }),
)

Source from the content-addressed store, hash-verified

38}
39
40export async function generateWorkspaceAndProject(
41 options:
42 | string
43 | (Omit<Partial<LibraryGeneratorSchema>, 'name'> & {
44 name: string;
45 }),
46) {
47 const tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
48 const { name, ...normalizedOptions } =
49 typeof options === 'string' ? { name: options } : options;
50 await libraryGenerator(tree, {
51 name,
52 directory: path.join('libs', name),
53 tags: 'scope:plugin',
54 linter: 'none',
55 unitTestRunner: 'none',
56 testEnvironment: 'node',
57 buildable: false,
58 publishable: false,
59 ...normalizedOptions,
60 });
61
62 return tree;
63}
64
65export function registerPluginInWorkspace(
66 tree: Tree,

Calls

no outgoing calls

Tested by

no test coverage detected