We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The content inventory command is used by https://github.com/ddbeck/mdn-content-inventory to publish https://www.npmjs.com/package/@ddbeck/mdn-content-inventory, see: https://github.com/ddbeck/mdn-content-inventory/blob/b8578e6e2847e79aa406d7db6d1152f9aa627d31/scripts/generate-inventory.mts#L135
The command is currently implemented in yari as part of tool: https://github.com/mdn/yari/blob/bbe07c528c6ab7376ca1f80896e83b9819a04bce/tool/cli.ts#L1038-L1069
tool
It is exposed in the content repository via the content script: https://github.com/mdn/content/blob/c198131b981b9274fcde625e441df7da7b41bec3/package.json#L23
content
FWIW Here is the full implementation:
const crawler = new fdir() .withFullPaths() .withErrors() .filter((filePath) => filePath.endsWith(".md")) .crawl(CONTENT_ROOT); const paths = (await crawler.withPromise()) as PathsOutput; const inventory = paths.map((path) => { const fileContents = fs.readFileSync(path, "utf-8"); const parsed = frontmatter(fileContents); return { path: path.substring(path.indexOf("/files")), frontmatter: parsed.attributes, }; }); process.stdout.write(JSON.stringify(inventory, undefined, 2));
The text was updated successfully, but these errors were encountered:
feat(content): add inventory command
a8a9e0b
fixes #75
bafc0f9
Successfully merging a pull request may close this issue.
The content inventory command is used by https://github.com/ddbeck/mdn-content-inventory to publish https://www.npmjs.com/package/@ddbeck/mdn-content-inventory, see:
https://github.com/ddbeck/mdn-content-inventory/blob/b8578e6e2847e79aa406d7db6d1152f9aa627d31/scripts/generate-inventory.mts#L135
The command is currently implemented in yari as part of
tool
:https://github.com/mdn/yari/blob/bbe07c528c6ab7376ca1f80896e83b9819a04bce/tool/cli.ts#L1038-L1069
It is exposed in the content repository via the
content
script:https://github.com/mdn/content/blob/c198131b981b9274fcde625e441df7da7b41bec3/package.json#L23
FWIW Here is the full implementation:
The text was updated successfully, but these errors were encountered: