From 2492e3687dfc513ae03833a536e67b500a8f0ffd Mon Sep 17 00:00:00 2001 From: "Guilherme Siquinelli (guiseek)" Date: Fri, 15 Oct 2021 02:59:48 -0300 Subject: [PATCH] fix(plugin-core): fix import-path repository generator --- libs/plugin/core/README.md | 2 +- .../core/src/generators/repository/generator.ts | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/libs/plugin/core/README.md b/libs/plugin/core/README.md index 6f19b8b..98b5346 100644 --- a/libs/plugin/core/README.md +++ b/libs/plugin/core/README.md @@ -3,7 +3,7 @@ ## Install ```sh -npm i @nx-clean/plugin-core +npm i -D @nx-clean/plugin-core ``` ## Generators diff --git a/libs/plugin/core/src/generators/repository/generator.ts b/libs/plugin/core/src/generators/repository/generator.ts index 9be809b..36abc89 100644 --- a/libs/plugin/core/src/generators/repository/generator.ts +++ b/libs/plugin/core/src/generators/repository/generator.ts @@ -7,6 +7,7 @@ import { readWorkspaceConfiguration, } from '@nrwl/devkit'; import { join } from 'path'; +import { getProjectImportPath } from '../../utils/get-project-import-path'; import { ImplRepositoryGeneratorSchema, NormalizedSchema, @@ -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,