Technically working options. Need CSS fix (plugin CSS not loaded) and data validation

This commit is contained in:
Mehdi Benadel
2024-05-23 02:26:38 +02:00
parent 9ea26dfd26
commit 687c4742f7
16 changed files with 717 additions and 1237 deletions

View File

@ -39,23 +39,10 @@ function loadLocs() {
return r
}
function loadMustaches () {
// Loading mustache templates, dans filling constants.
const r = []
r['MUSTACHE_CONFIGURATION_HOME'] = loadMustache('client/common/configuration/templates/home.mustache')
r['MUSTACHE_CONFIGURATION_CHANNEL'] = loadMustache('client/common/configuration/templates/channel.mustache')
return r
}
function loadMustache (file) {
const filePath = path.resolve(__dirname, file)
return JSON.stringify(fs.readFileSync(filePath).toString())
}
const define = Object.assign({
PLUGIN_CHAT_PACKAGE_NAME: JSON.stringify(packagejson.name),
PLUGIN_CHAT_SHORT_NAME: JSON.stringify(packagejson.name.replace(/^peertube-plugin-/, ''))
}, loadLocs(), loadMustaches())
}, loadLocs())
const configs = clientFiles.map(f => ({
entryPoints: [ path.resolve(__dirname, 'client', f + '.ts') ],