Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Commit abb97fc

Browse files
authored
add yaml mime, remove service mapping step (#3)
1 parent 6a9fa96 commit abb97fc

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

src/Microsoft.Content.Build.Code2Yaml.Constants/Constants.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ public static class Constants
3131
public const string CmdArgLanguage = "lang:";
3232
public const string Dot = ".";
3333

34+
public static class YamlMime
35+
{
36+
public const string YamlMimePrefix = "### YamlMime:";
37+
public const string ManagedReference = YamlMimePrefix + "ManagedReference";
38+
public const string TableOfContent = YamlMimePrefix + "TableOfContent";
39+
}
40+
3441
public static class Doxyfile
3542
{
3643
public const string INPUT = "INPUT";

src/Microsoft.Content.Build.Code2Yaml.Steps/GenerateArticles.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ await pages.ForEachInParallelAsync(
116116
}
117117
using (var writer = new StreamWriter(Path.Combine(outputPath, page.Items[0].Href)))
118118
{
119+
writer.WriteLine(Constants.YamlMime.ManagedReference);
119120
YamlSerializer.Value.Serialize(writer, page);
120121
}
121122
});

src/Microsoft.Content.Build.Code2Yaml.Steps/GenerateToc.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ orderby toc.Name.ToLower()
4747
string tocFile = Path.Combine(outputPath, Constants.TocYamlFileName);
4848
using (var writer = new StreamWriter(tocFile))
4949
{
50+
writer.WriteLine(Constants.YamlMime.TableOfContent);
5051
new YamlSerializer().Serialize(writer, tocYaml);
5152
}
5253

src/code2yaml/Program.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ static int Main(string[] args)
3434
new List<IStep>
3535
{
3636
new GenerateToc { NameGenerator = NameGeneratorFactory.Create(_config.Language) },
37-
new StepCollection(
38-
new GenerateArticles { Generator = ArticleGeneratorFactory.Create(_config.Language) },
39-
new GenerateServiceMappingFile()),
37+
new GenerateArticles { Generator = ArticleGeneratorFactory.Create(_config.Language) },
4038
}));
4139
var status = 1;
4240
var watch = Stopwatch.StartNew();

0 commit comments

Comments
 (0)