Skip to content

Commit

Permalink
fix(plugin-core): fix import-path repository generator
Browse files Browse the repository at this point in the history
  • Loading branch information
guiseek committed Oct 15, 2021
1 parent f231b99 commit 2492e36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/plugin/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Install

```sh
npm i @nx-clean/plugin-core
npm i -D @nx-clean/plugin-core
```

## Generators
Expand Down
14 changes: 12 additions & 2 deletions libs/plugin/core/src/generators/repository/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
readWorkspaceConfiguration,
} from '@nrwl/devkit';
import { join } from 'path';
import { getProjectImportPath } from '../../utils/get-project-import-path';
import {
ImplRepositoryGeneratorSchema,
NormalizedSchema,
Expand Down Expand Up @@ -80,8 +81,17 @@ function normalizeOptions(
): NormalizedSchema {
const npmScope = readWorkspaceConfiguration(host).npmScope;
const format = names(options.type).fileName;
const projectDomain = options.domain;
const projectData = options.data;

const configDomain = readProjectConfiguration(host, options.domain);
const projectDomain = configDomain
? getProjectImportPath(configDomain)
: options.domain;

const configData = readProjectConfiguration(host, options.domain);
const projectData = configData
? getProjectImportPath(configData)
: options.data;

return {
...options,
projectDomain,
Expand Down

0 comments on commit 2492e36

Please sign in to comment.