mirror of
https://github.com/hsjobeki/noogle.git
synced 2024-12-30 01:13:04 +03:00
d9f579cf44
* refactor to include all necessary dependencies directly here * move indexer into monorepo * add snapshot tests and seperate sub.project for builtin types * add more missing builtins such as fromTOML
37 lines
477 B
JavaScript
37 lines
477 B
JavaScript
// simple script
|
|
// test.json in generated with "cargo run -- --dir ./test"
|
|
const data = require("./test.json");
|
|
const fs = require("fs");
|
|
|
|
const all_docs = data.reduce(
|
|
(acc, doc) => `${acc}
|
|
## ${doc.name}
|
|
|
|
### Description
|
|
|
|
\`\`\`nix
|
|
${doc.description}
|
|
\`\`\`
|
|
|
|
### Example
|
|
|
|
\`\`\`nix
|
|
${doc.example}
|
|
\`\`\`
|
|
|
|
### Type
|
|
|
|
\`\`\`nix
|
|
${doc.fn_type}
|
|
\`\`\`
|
|
|
|
`,
|
|
""
|
|
);
|
|
|
|
fs.writeFile("content.md", `# Functions\n${all_docs}`, (err) => {
|
|
if (err) {
|
|
console.error(err);
|
|
}
|
|
});
|