Skip to content

Commit

Permalink
Merge pull request #6 from mjczone/develop
Browse files Browse the repository at this point in the history
Fix to package json file for docs
  • Loading branch information
mattjcowan authored Dec 13, 2024
2 parents ebcfed3 + dcb01cd commit c05a66f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
3 changes: 1 addition & 2 deletions docs/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,9 @@ p > code {
}

.package-page {
// allow wrapping on the package page
.q-table--no-wrap td,
.q-table--no-wrap th {
white-space: wrap;
white-space: wrap !important;
}
table {
min-width: 50%;
Expand Down
20 changes: 12 additions & 8 deletions tests/MJCZone.DapperMatic.Tests/TestOutputDocs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void Can_generate_docs()
)
.ToList();

var jsonFile = Path.Combine(assemblyDirectory, $"{assembly.GetName().Name}.json");
var akovJsonFile = Path.Combine(assemblyDirectory, $"{assembly.GetName().Name}.docs.json");
var stringEnumConverter = new System.Text.Json.Serialization.JsonStringEnumConverter();
var serializationSettings = new JsonSerializerOptions
{
Expand All @@ -85,14 +85,14 @@ public void Can_generate_docs()
},
data = akovData,
};
File.WriteAllText(jsonFile, JsonSerializer.Serialize(output, serializationSettings));
File.WriteAllText(akovJsonFile, JsonSerializer.Serialize(output, serializationSettings));
//Logger.WriteLine(JsonSerializer.Serialize(akovData, serializationSettings));

var docsJsonFileName = $"{assembly.GetName().Name}.json";
var docsJsonFile = Path.Combine(assemblyDirectory, docsJsonFileName);
var docs = new Docs();
docs.AddAssembly(assembly, xml);
File.WriteAllText(docsJsonFile, JsonSerializer.Serialize(docs, serializationSettings));
// var docsJsonFileName = $"{assembly.GetName().Name}.json";
// var docsJsonFile = Path.Combine(assemblyDirectory, docsJsonFileName);
// var docs = new Docs();
// docs.AddAssembly(assembly, xml);
// File.WriteAllText(docsJsonFile, JsonSerializer.Serialize(docs, serializationSettings));
//Logger.WriteLine(JsonSerializer.Serialize(docs, serializationSettings));

// output the file to the docs directory
Expand All @@ -108,7 +108,11 @@ public void Can_generate_docs()
}
var packagesDirectory = Path.Combine(rootDirectory, "docs", "packages");
Directory.CreateDirectory(packagesDirectory);
File.Copy(docsJsonFile, Path.Combine(packagesDirectory, docsJsonFileName), true);
File.Copy(
akovJsonFile,
Path.Combine(packagesDirectory, $"{assembly.GetName().Name}.json"),
true
);
return;

// The following is prototypical code created BEFORE the Akov.NetDocsProcessor was used.
Expand Down

0 comments on commit c05a66f

Please sign in to comment.