diff --git a/libs/sage-monorepo/nx-sage-monorepo/src/plugins/build-project-configuration.ts b/libs/sage-monorepo/nx-sage-monorepo/src/plugins/build-project-configuration.ts index d7e64e122..6028f3b35 100644 --- a/libs/sage-monorepo/nx-sage-monorepo/src/plugins/build-project-configuration.ts +++ b/libs/sage-monorepo/nx-sage-monorepo/src/plugins/build-project-configuration.ts @@ -14,5 +14,11 @@ export async function buildProjectConfiguration( const metadata = {}; const tags: string[] = []; + console.log(`HELLO: ${options.projectBuilder}`); + if (options.projectBuilder) { + console.log(`BUILDER: ${options.projectBuilder}`); + tags.push(`builder:${options.projectBuilder}`); + } + return { targets, metadata, tags }; } diff --git a/libs/sage-monorepo/nx-sage-monorepo/src/plugins/plugin.ts b/libs/sage-monorepo/nx-sage-monorepo/src/plugins/plugin.ts index 86ad64e64..b3ddec6d2 100644 --- a/libs/sage-monorepo/nx-sage-monorepo/src/plugins/plugin.ts +++ b/libs/sage-monorepo/nx-sage-monorepo/src/plugins/plugin.ts @@ -68,11 +68,7 @@ async function createNodesInternal( projectConfigurationsCache: Record, ) { const projectRoot = dirname(configFilePath); - // Do not create a project if project.json and Dockerfile isn't there. const siblingFiles = readdirSync(join(context.workspaceRoot, projectRoot)); - if (!siblingFiles.includes('project.json') && !siblingFiles.includes('Dockerfile')) { - return {}; - } // Content of the project file const projectFileContent: ProjectConfiguration = readJsonFile(configFilePath); @@ -101,6 +97,7 @@ async function createNodesInternal( const projectConfigurationBuilderOptions: ProjectConfigurationBuilderOptions = { projectRoot, pluginConfig, + projectBuilder, }; projectConfigurationsCache[hash] ??= await buildProjectConfiguration( projectConfigurationBuilderOptions, diff --git a/libs/sage-monorepo/nx-sage-monorepo/src/plugins/project-configuration-builder-options.ts b/libs/sage-monorepo/nx-sage-monorepo/src/plugins/project-configuration-builder-options.ts index 7b9d009c6..f3f4e6480 100644 --- a/libs/sage-monorepo/nx-sage-monorepo/src/plugins/project-configuration-builder-options.ts +++ b/libs/sage-monorepo/nx-sage-monorepo/src/plugins/project-configuration-builder-options.ts @@ -1,6 +1,8 @@ import { PluginConfiguration } from './plugin-configuration'; +import { ProjectBuilder } from './project-builder'; export type ProjectConfigurationBuilderOptions = { projectRoot: string; pluginConfig: PluginConfiguration; + projectBuilder?: ProjectBuilder; };