0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 22:52:40 +00:00

Load available CM themes to global config

This commit is contained in:
G.Ambatte
2023-04-02 15:17:44 +12:00
parent da6fcb297a
commit 977cbeed43

View File

@@ -17,6 +17,8 @@ const asyncHandler = require('express-async-handler');
const { DEFAULT_BREW } = require('./brewDefaults.js');
const codeMirrorThemes = require('../themes/codeMirror/editorThemes.json');
const splitTextStyleAndMetadata = (brew)=>{
brew.text = brew.text.replaceAll('\r\n', '\n');
if(brew.text.startsWith('```metadata')) {
@@ -419,9 +421,10 @@ app.use(asyncHandler(async (req, res, next)=>{
// Create configuration object
const configuration = {
local : isLocalEnvironment,
publicUrl : config.get('publicUrl') ?? '',
environment : nodeEnv
local : isLocalEnvironment,
publicUrl : config.get('publicUrl') ?? '',
environment : nodeEnv,
codeMirrorThemes : codeMirrorThemes
};
const props = {
version : require('./../package.json').version,