Move around files so the repo will be organized as a monorepo.

This commit is contained in:
be5invis 2023-12-03 02:49:33 -08:00
parent 65d1880a84
commit 08c69f0fd3
365 changed files with 1477 additions and 1262 deletions

View file

@ -0,0 +1,31 @@
export class MdCol {
constructor(sectionName) {
this.data = "";
this.sectionName = sectionName;
this.matchRegex = new RegExp(
`^([ \\t]*)<!-- BEGIN ${sectionName} -->\\n[\\s\\S]*?<!-- END ${sectionName} -->\\n`,
`m`
);
}
log(...s) {
this.data += s.join("") + "\n";
}
apply(s) {
return s.replace(this.matchRegex, (m, $1) => {
return (
`<!-- BEGIN ${this.sectionName} -->\n` +
`<!-- THIS SECTION IS AUTOMATICALLY GENERATED. DO NOT EDIT. -->\n\n` +
this.data +
`\n<!-- END ${this.sectionName} -->\n`
).replace(/^/gm, $1);
});
}
}
export function ImgX(path, w) {
const widthProp = w ? ` width=${w}` : ``;
return (
`<img src="${path}.light.svg#gh-light-mode-only"${widthProp}/>` +
`<img src="${path}.dark.svg#gh-dark-mode-only"${widthProp}/>`
);
}