@ox-content/vite-plugin 2.40.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +15 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -821,6 +821,10 @@ async function extractDocs(srcDirs, options) {
|
|
|
821
821
|
typeParameters: options.typeParameters
|
|
822
822
|
}).map((doc) => ({
|
|
823
823
|
file: doc.file,
|
|
824
|
+
description: doc.description,
|
|
825
|
+
sourcePath: doc.sourcePath,
|
|
826
|
+
examples: doc.examples,
|
|
827
|
+
tags: toTagRecord(doc.tags),
|
|
824
828
|
entries: doc.entries
|
|
825
829
|
}));
|
|
826
830
|
}
|
|
@@ -871,6 +875,13 @@ async function writeDocs(docs, outDir, extractedDocs, options) {
|
|
|
871
875
|
function toRustDocsModules(docs) {
|
|
872
876
|
return docs.map((doc) => ({
|
|
873
877
|
file: doc.file,
|
|
878
|
+
description: doc.description,
|
|
879
|
+
sourcePath: doc.sourcePath,
|
|
880
|
+
examples: doc.examples,
|
|
881
|
+
tags: doc.tags ? Object.entries(doc.tags).map(([tag, value]) => ({
|
|
882
|
+
tag,
|
|
883
|
+
value
|
|
884
|
+
})) : void 0,
|
|
874
885
|
entries: doc.entries.map((entry) => ({
|
|
875
886
|
name: entry.name,
|
|
876
887
|
kind: entry.kind,
|
|
@@ -891,6 +902,10 @@ function toRustDocsModules(docs) {
|
|
|
891
902
|
}))
|
|
892
903
|
}));
|
|
893
904
|
}
|
|
905
|
+
function toTagRecord(tags) {
|
|
906
|
+
if (!tags?.length) return;
|
|
907
|
+
return Object.fromEntries(tags.map(({ tag, value }) => [tag, value]));
|
|
908
|
+
}
|
|
894
909
|
function resolveDocsOptions(options) {
|
|
895
910
|
if (options === false) return false;
|
|
896
911
|
const opts = options || {};
|