Skip to content

Commit b013739

Browse files
committed
fix(qwik-nx): updated utils and generator to be compatible with nx 20.7.1
1 parent 4913029 commit b013739

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/qwik-nx/src/generators/application/generator-internal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { addE2eProject } from './utils/add-e2e';
2525
function addFiles(tree: Tree, options: NormalizedSchema) {
2626
const templateOptions = {
2727
...options,
28-
...names(options.name),
28+
...names(options.name || options.projectName),
2929
template: '',
3030
};
3131
generateFiles(

packages/qwik-nx/src/generators/component/utils/normalize-options.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function normalizeNameAndPaths(
3535
);
3636

3737
const projectSourceRoot = sourceRoot ?? joinPathFragments(root, 'src');
38-
const { name, path: namePath } = parseNameWithPath(options.name);
38+
const componentName = options.name || 'component';
39+
const { name, path: namePath } = parseNameWithPath(componentName);
3940

4041
const path =
4142
options.directory ??

packages/qwik-nx/src/generators/library/utils/normalize-options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import { Linter } from '@nx/eslint';
33
import { LibraryGeneratorSchema, NormalizedSchema } from '../schema';
44
import {
55
determineProjectNameAndRootOptions,
6-
ensureProjectName,
6+
ensureRootProjectName,
77
} from '@nx/devkit/src/generators/project-name-and-root-utils';
88

99
export async function normalizeOptions(
1010
tree: Tree,
1111
schema: LibraryGeneratorSchema
1212
): Promise<NormalizedSchema> {
13-
await ensureProjectName(tree, schema, 'library');
13+
await ensureRootProjectName(schema, 'library');
1414

1515
const { projectName, projectRoot } = await determineProjectNameAndRootOptions(
1616
tree,

0 commit comments

Comments
 (0)