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

Commit

Permalink
add yaml mime, remove service mapping step (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
superyyrrzz authored Jul 4, 2017
1 parent 6a9fa96 commit abb97fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/Microsoft.Content.Build.Code2Yaml.Constants/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ public static class Constants
public const string CmdArgLanguage = "lang:";
public const string Dot = ".";

public static class YamlMime
{
public const string YamlMimePrefix = "### YamlMime:";
public const string ManagedReference = YamlMimePrefix + "ManagedReference";
public const string TableOfContent = YamlMimePrefix + "TableOfContent";
}

public static class Doxyfile
{
public const string INPUT = "INPUT";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ await pages.ForEachInParallelAsync(
}
using (var writer = new StreamWriter(Path.Combine(outputPath, page.Items[0].Href)))
{
writer.WriteLine(Constants.YamlMime.ManagedReference);
YamlSerializer.Value.Serialize(writer, page);
}
});
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.Content.Build.Code2Yaml.Steps/GenerateToc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ orderby toc.Name.ToLower()
string tocFile = Path.Combine(outputPath, Constants.TocYamlFileName);
using (var writer = new StreamWriter(tocFile))
{
writer.WriteLine(Constants.YamlMime.TableOfContent);
new YamlSerializer().Serialize(writer, tocYaml);
}

Expand Down
4 changes: 1 addition & 3 deletions src/code2yaml/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ static int Main(string[] args)
new List<IStep>
{
new GenerateToc { NameGenerator = NameGeneratorFactory.Create(_config.Language) },
new StepCollection(
new GenerateArticles { Generator = ArticleGeneratorFactory.Create(_config.Language) },
new GenerateServiceMappingFile()),
new GenerateArticles { Generator = ArticleGeneratorFactory.Create(_config.Language) },
}));
var status = 1;
var watch = Stopwatch.StartNew();
Expand Down

0 comments on commit abb97fc

Please sign in to comment.