mirror of
https://github.com/Heretek-AI/awesome-opencode.git
synced 2026-11-07 10:45:57 -10:00
Entries gain a fixed kind and 1-3 topics (replacing 374 one-off tags as the categorization axis), an OpenCode API compat field (required for plugins), and npm/path for packages and monorepo folders. repo must be a repository root; unknown fields such as install: or repository: are rejected. Cross-entry rules (one entry per repo+path, kind must fit the category, no placeholder owners or mojibake) live in scripts/utils/catalog.js, and validate.js now always loads the whole catalog and fails on unparseable YAML. Adds npm run fmt for canonical formatting and drops the unused glob dependency. Co-Authored-By: Claude Opus 5.5 <[email protected]>
19 lines
404 B
JavaScript
19 lines
404 B
JavaScript
/**
|
|
* Filename helpers for awesome-opencode entries.
|
|
* (Catalog loading lives in ./catalog.js.)
|
|
*/
|
|
|
|
/**
|
|
* Convert a name to a filename-safe slug
|
|
* @param {string} name - Entry name
|
|
* @returns {string} Slugified filename (without extension)
|
|
*/
|
|
function slugify(name) {
|
|
return name
|
|
.toLowerCase()
|
|
.replace(/[^a-z0-9]+/g, '-')
|
|
.replace(/^-+|-+$/g, '');
|
|
}
|
|
|
|
module.exports = { slugify };
|