Add archify-vscode-ext skill: Archify diagrams and models for the Archify Diagram Viewer extension

Model tasks (validate, list, scaffold, resolve), diagram tasks (validate,
render), the bundled Archify 3.0.1 runtime and yaml parser under
scripts/vendor, references for authoring, formats and folders, and the
online-shop example model.
This commit is contained in:
root-at-skic committed 2026-10-19 11:42:06 +03:00
commit b6b5e57922
226 files changed
+67520

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
/**
* Stringifies a comment.
*
* Empty comment lines are left empty,
* lines consisting of a single space are replaced by `#`,
* and all other lines are prefixed with a `#`.
*/
const stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');
function indentComment(comment, indent) {
if (/^\n+$/.test(comment))
return comment.substring(1);
return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
}
const lineComment = (str, indent, comment) => str.endsWith('\n')
? indentComment(comment, indent)
: comment.includes('\n')
? '\n' + indentComment(comment, indent)
: (str.endsWith(' ') ? '' : ' ') + comment;
export { indentComment, lineComment, stringifyComment };