private string CheckThemeExists(string propertyName, string themeName) { if (!Directory.Exists(Path.Combine(EnvVar.ThemeOutputPath(themeName)))) { ReportError(new NotImplementedException($"A theme named '{themeName}' does not exist."), propertyName); } return(themeName); }
public void Output(bool overwriteExisting, string outputDirectory, string projectFilePath, string themeName, IEnumerable <string> copyPaths, IEnumerable <string> copyAndParsePaths) { var relativeDirectory = Path.GetDirectoryName(projectFilePath ?? EnvVar.DefaultInfoPath) ?? string.Empty; // Copy user's extra files. foreach (var filePath in copyPaths) { this.CopyFile(overwriteExisting, false, outputDirectory, relativeDirectory, Path.Combine(relativeDirectory, filePath)); } // Copy and parse user's extra files. foreach (var filePath in copyAndParsePaths) { this.CopyFile(overwriteExisting, true, outputDirectory, relativeDirectory, Path.Combine(relativeDirectory, filePath)); } // Copy the parts needed from theme files. foreach (var part in _themeParts) { this.CopyFilesFromDir(overwriteExisting, true, true, outputDirectory, EnvVar.ThemeOutputPath(themeName), part); } }