migrate to "export default"

also, set no-use-before-define in linter
This commit is contained in:
Girish Ramakrishnan
2026-02-14 15:43:24 +01:00
parent ddb46646fa
commit 36aa641cb9
231 changed files with 2846 additions and 2728 deletions
+7 -6
View File
@@ -1,5 +1,5 @@
import assert from 'node:assert';
import * as cloudron from './cloudron.js';
import cloudron from './cloudron.js';
import debugModule from 'debug';
import fs from 'node:fs';
import path from 'node:path';
@@ -8,11 +8,6 @@ import safe from 'safetydance';
const debug = debugModule('box:translation');
export {
translate,
getTranslations,
listLanguages
};
// to be used together with getTranslations() => { translations, fallback }
function translate(input, assets) {
@@ -73,3 +68,9 @@ async function listLanguages() {
const languages = jsonFiles.map(function (file) { return path.basename(file, '.json'); });
return languages;
}
export default {
translate,
getTranslations,
listLanguages
};