mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 22:25:24 +00:00
feat: move snippets backend and tables into a plugin (B2)
This commit is contained in:
1 parent
fdedca39fd
commit
e07221eaf3
51 files changed
+28426
-3553
No files matched your search
@@ -52,7 +52,8 @@ export { default } from ${target};`
|
||||
}
|
||||
const require = createRequire(path.join(repoRoot, "package.json"));
|
||||
const names = Object.keys(require(specifier)).filter(
|
||||
(name) => name !== "default" && name !== "__esModule" && IDENTIFIER.test(name),
|
||||
(name) =>
|
||||
name !== "default" && name !== "__esModule" && IDENTIFIER.test(name),
|
||||
);
|
||||
const lines = [`import * as m from ${JSON.stringify(specifier)};`];
|
||||
lines.push("const d = m.default ?? m;");
|
||||
@@ -140,7 +141,7 @@ export function termixPluginHost({ repoRoot, sdkUiEntry, sdkFrontendEntry }) {
|
||||
"}",
|
||||
"for (const [file, load] of Object.entries(locales)) {",
|
||||
' const parts = file.split("/");',
|
||||
' const id = parts[2];',
|
||||
" const id = parts[2];",
|
||||
' const name = parts[parts.length - 1].replace(/\\.json$/, "");',
|
||||
" (workspaceLocales[id] ??= {})[name] = load;",
|
||||
"}",
|
||||
|
||||
Reference in new issue
Block a user