Skip to content

Commit

Permalink
fix: bff readme and program target proper filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
pdevito3 committed Apr 20, 2022
1 parent 1e976ca commit e9422fb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Craftsman/Builders/Bff/AppSettingsBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

public class AppSettingsBuilder
{
public static void CreateBffAppSettings(string projectDirectory, string projectName, IFileSystem fileSystem)
public static void CreateBffAppSettings(string projectDirectory, IFileSystem fileSystem)
{
var classPath = ClassPathHelper.BffProjectRootClassPath(projectDirectory, $"appsettings.json", projectName);
var classPath = ClassPathHelper.BffProjectRootClassPath(projectDirectory, $"appsettings.json");
var fileText = @$"{{
""AllowedHosts"": ""*""
}}
Expand Down
2 changes: 1 addition & 1 deletion Craftsman/Builders/Bff/BffReadmeBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class BffReadmeBuilder
{
public static void CreateReadme(string projectDirectory, string projectName, IFileSystem fileSystem)
{
var classPath = ClassPathHelper.BffProjectRootClassPath(projectDirectory, $"Program.cs", projectName);
var classPath = ClassPathHelper.BffProjectRootClassPath(projectDirectory, $"README.md");
var fileText = GetReadmeFileText(projectName);
Utilities.CreateFile(classPath, fileText, fileSystem);
}
Expand Down
2 changes: 1 addition & 1 deletion Craftsman/Builders/Bff/ProgramBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class ProgramBuilder
{
public static void CreateProgram(string projectDirectory, string solutionDirectory, string projectName, BffTemplate template, IFileSystem fileSystem)
{
var classPath = ClassPathHelper.BffProjectRootClassPath(projectDirectory, $"Program.cs", projectName);
var classPath = ClassPathHelper.BffProjectRootClassPath(projectDirectory, $"Program.cs");
var fileText = GetProgramText(template, solutionDirectory, projectName);
Utilities.CreateFile(classPath, fileText, fileSystem);
}
Expand Down
2 changes: 1 addition & 1 deletion Craftsman/Builders/Docker/BffDockerfileBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class BffDockerfileBuilder

public static void CreateBffDotNetDockerfile(string projectDirectory, string projectBaseName, IFileSystem fileSystem)
{
var classPath = ClassPathHelper.BffProjectRootClassPath(projectDirectory, $"Dockerfile", projectBaseName);
var classPath = ClassPathHelper.BffProjectRootClassPath(projectDirectory, $"Dockerfile");
var fileText = GetDockerfileText(projectBaseName, true, false);
Utilities.CreateFile(classPath, fileText, fileSystem);
}
Expand Down
2 changes: 1 addition & 1 deletion Craftsman/Commands/AddBffCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static void AddBff(BffTemplate template, string domainDirectory, IFileSys

// .NET Project
LaunchSettingsBuilder.CreateLaunchSettings(projectDirectory, projectName, template, fileSystem);
AppSettingsBuilder.CreateBffAppSettings(projectDirectory, projectName, fileSystem);
AppSettingsBuilder.CreateBffAppSettings(projectDirectory, fileSystem);
LoggingConfigurationBuilder.CreateBffConfigFile(domainDirectory, projectName, fileSystem);

ProgramBuilder.CreateProgram(projectDirectory, domainDirectory, projectName, template, fileSystem);
Expand Down
2 changes: 1 addition & 1 deletion Craftsman/Helpers/ClassPathHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static ClassPath AuthServerAppSettingsClassPath(string projectDirectory,
return new ClassPath(projectDirectory, authServerProjectName, className);
}

public static ClassPath BffProjectRootClassPath(string projectDirectory, string className, string projectName)
public static ClassPath BffProjectRootClassPath(string projectDirectory, string className)
{
return new ClassPath(projectDirectory, "", className);
}
Expand Down

0 comments on commit e9422fb

Please sign in to comment.