(
options:
| string
| (Omit<Partial<LibraryGeneratorSchema>, 'name'> & {
name: string;
}),
)
| 38 | } |
| 39 | |
| 40 | export 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 | |
| 65 | export function registerPluginInWorkspace( |
| 66 | tree: Tree, |
no outgoing calls
no test coverage detected