Added submodule for automatically installing frontend packages

pull/22/head
tycrek 3 years ago
parent 8f97f7dd1b
commit 4ce44c052b
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -22,7 +22,7 @@ const { CODE_NO_CONTENT, CODE_INTERNAL_SERVER_ERROR } = require('./MagicNumbers.
// Set up premium frontend
const FRONTEND_NAME = 'ass-x'; // <-- Change this to use a custom frontend
const ASS_PREMIUM = fs.existsSync(`./${FRONTEND_NAME}/package.json`) ? require(`./${FRONTEND_NAME}`) : { enabled: false };
const ASS_PREMIUM = fs.existsSync(`./${FRONTEND_NAME}/package.json`) ? (require('submodule'), require(`./${FRONTEND_NAME}`)) : { enabled: false };
//#region Variables, module setup
const app = express();
@ -63,7 +63,7 @@ function preStartup() {
fs.ensureDirSync(path(diskFilePath, 'thumbnails'));
// Print frontend operating mode
log(`Frontend: ${ASS_PREMIUM.enabled ? ASS_PREMIUM.brand : '<none>'}`)
log(`Frontend: ${ASS_PREMIUM.enabled ? ASS_PREMIUM.brand : '<none>'}`);
}
/**

856
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -45,7 +45,8 @@
"pug": "^3.0.2",
"sanitize-filename": "^1.6.3",
"stream-to-array": "^2.3.0",
"submodule": "^1.2.1",
"tycrek-s3-transform": "^3.3.0",
"uuid": "^8.3.2"
}
}
}

Loading…
Cancel
Save