1
mirror of https://gitlab.com/commento/commento.git synced 2025-06-29 22:56:37 -04:00

frontend,api: refactor static router

This commit is contained in:
Adhityaa Chandrasekar
2018-12-24 21:49:53 -05:00
parent c29b3a7a25
commit 6d00a8e3aa
4 changed files with 104 additions and 106 deletions

View File

@ -26,28 +26,33 @@ const jsCompileMap = {
"js/highlight.js": ["node_modules/highlightjs/highlight.pack.min.js"],
"js/chartist.js": ["node_modules/chartist/dist/chartist.min.js"],
"js/login.js": [
"js/constants.js",
"js/utils.js",
"js/http.js",
"js/auth-common.js",
"js/login.js"
],
"js/forgot.js": [
"js/constants.js",
"js/utils.js",
"js/http.js",
"js/forgot.js"
],
"js/reset.js": [
"js/constants.js",
"js/utils.js",
"js/http.js",
"js/reset.js"
],
"js/signup.js": [
"js/constants.js",
"js/utils.js",
"js/http.js",
"js/auth-common.js",
"js/signup.js"
],
"js/dashboard.js": [
"js/constants.js",
"js/utils.js",
"js/http.js",
"js/errors.js",
@ -63,6 +68,7 @@ const jsCompileMap = {
"js/dashboard-danger.js",
],
"js/logout.js": [
"js/constants.js",
"js/utils.js",
"js/logout.js"
],

View File

@ -65,8 +65,8 @@
var ID_FOOTER = "commento-footer";
var origin = global.origin;
var cdn = global.cdn;
var origin = "[[[.Origin]]]";
var cdn = "[[[.CdnPrefix]]]";
var root = null;
var cssOverride;
var autoInit;

13
frontend/js/constants.js Normal file
View File

@ -0,0 +1,13 @@
(function (global, document) {
"use strict";
(document);
if (window.commento === undefined) {
window.commento = {};
}
window.commento.origin = "[[[.Origin]]]";
window.commento.cdn = "[[[.CdnPrefix]]]";
} (window, document));