Use Node for asset building instead of building on the fly every time (feat. minification!)

This commit is contained in:
flash 2023-07-15 23:58:17 +00:00
parent ec74f74624
commit ace24c8eee
139 changed files with 1639 additions and 185 deletions

View file

@ -22,6 +22,7 @@ define('MSZ_LIBRARIES', MSZ_ROOT . '/lib');
define('MSZ_CONFIG', MSZ_ROOT . '/config');
define('MSZ_TEMPLATES', MSZ_ROOT . '/templates');
define('MSZ_MIGRATIONS', MSZ_ROOT . '/database');
define('MSZ_ASSETS', MSZ_ROOT . '/assets');
define('MSZ_NDX_PATH', MSZ_LIBRARIES . '/index');
define('MSZ_NDX_PATH_DEV', MSZ_LIBRARIES . '/index-dev');
@ -148,6 +149,11 @@ Template::set('globals', [
],
]);
$mszAssetsInfo = json_decode(file_get_contents(MSZ_ASSETS . '/current.json'));
if(!empty($mszAssetsInfo))
Template::set('assets', $mszAssetsInfo);
unset($mszAssetsInfo);
Template::addPath(MSZ_TEMPLATES);
AuthToken::setSecretKey($cfg->getValue('auth.secret', IConfig::T_STR, 'meow'));