reorganize file structure for firebase
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 492 B |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 275 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 899 B After Width: | Height: | Size: 899 B |
Before Width: | Height: | Size: 897 B After Width: | Height: | Size: 897 B |
Before Width: | Height: | Size: 511 B After Width: | Height: | Size: 511 B |
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 509 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
|
@ -11,6 +11,7 @@ interface Website {
|
||||||
jsfile: string;
|
jsfile: string;
|
||||||
cssfile: string;
|
cssfile: string;
|
||||||
themecolor: string;
|
themecolor: string;
|
||||||
|
path?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const APP = express();
|
const APP = express();
|
||||||
|
@ -23,32 +24,33 @@ const WEBSITES = [
|
||||||
sitename: "index",
|
sitename: "index",
|
||||||
title: "IEEE at UCSD",
|
title: "IEEE at UCSD",
|
||||||
description: "",
|
description: "",
|
||||||
jsfile: "js/index.js",
|
jsfile: "assets/js/index.js",
|
||||||
cssfile: "css/styles.css",
|
cssfile: "assets/css/styles.css",
|
||||||
themecolor: "",
|
themecolor: "",
|
||||||
|
path: "/",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sitename: "events",
|
sitename: "events",
|
||||||
title: "IEEE at UCSD",
|
title: "IEEE at UCSD",
|
||||||
description: "",
|
description: "",
|
||||||
jsfile: "js/events.js",
|
jsfile: "assets/js/events.js",
|
||||||
cssfile: "css/styles.css",
|
cssfile: "assets/css/styles.css",
|
||||||
themecolor: "",
|
themecolor: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sitename: "projects",
|
sitename: "projects",
|
||||||
title: "IEEE at UCSD",
|
title: "IEEE at UCSD",
|
||||||
description: "",
|
description: "",
|
||||||
jsfile: "js/projects.js",
|
jsfile: "assets/js/projects.js",
|
||||||
cssfile: "css/styles.css",
|
cssfile: "assets/css/styles.css",
|
||||||
themecolor: "",
|
themecolor: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sitename: "committees",
|
sitename: "committees",
|
||||||
title: "IEEE at UCSD",
|
title: "IEEE at UCSD",
|
||||||
description: "",
|
description: "",
|
||||||
jsfile: "js/committees.js",
|
jsfile: "assets/js/committees.js",
|
||||||
cssfile: "css/styles.css",
|
cssfile: "assets/css/styles.css",
|
||||||
themecolor: "",
|
themecolor: "",
|
||||||
},
|
},
|
||||||
] as Website[];
|
] as Website[];
|
||||||
|
@ -106,8 +108,19 @@ function generateFilePages() {
|
||||||
let site: Website;
|
let site: Website;
|
||||||
for (site of WEBSITES) {
|
for (site of WEBSITES) {
|
||||||
const html = generatePage(site.sitename);
|
const html = generatePage(site.sitename);
|
||||||
|
fs.mkdirSync(
|
||||||
|
path.join(__dirname, "../public/", site.path ?? site.sitename),
|
||||||
|
{
|
||||||
|
recursive: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
path.join(__dirname, "../public/", `${site.sitename}.html`),
|
path.join(
|
||||||
|
__dirname,
|
||||||
|
"../public/",
|
||||||
|
site.path ?? site.sitename,
|
||||||
|
"/index.html"
|
||||||
|
),
|
||||||
html
|
html
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="assets/css/fonts.css" media="screen">
|
||||||
<link rel="stylesheet" type="text/css" href="css/fonts.css" media="screen">
|
|
||||||
<link rel="stylesheet" type="text/css" href="$CSSFILE" media="screen">
|
<link rel="stylesheet" type="text/css" href="$CSSFILE" media="screen">
|
||||||
<link rel="icon" href="img/favicon.ico" type="image/x-icon">
|
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
||||||
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1">
|
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1">
|
||||||
<meta name="description" content="$DESCRIPTION">
|
<meta name="description" content="$DESCRIPTION">
|
||||||
<meta name="theme-color" content="$THEMECOLOR">
|
<meta name="theme-color" content="$THEMECOLOR">
|
||||||
|
|
|
@ -6,7 +6,7 @@ module.exports = {
|
||||||
entry: loadEntries("./src/public"),
|
entry: loadEntries("./src/public"),
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, "build/public"),
|
path: path.resolve(__dirname, "build/public"),
|
||||||
filename: "./js/[name].js",
|
filename: "./assets/js/[name].js",
|
||||||
},
|
},
|
||||||
mode: "production",
|
mode: "production",
|
||||||
module: {
|
module: {
|
||||||
|
@ -32,19 +32,11 @@ module.exports = {
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
{
|
{
|
||||||
// Copy utility files
|
// Copy non-ts, non-tsx files
|
||||||
from: "./src/util",
|
from: "./src",
|
||||||
to: "../util",
|
to: "../",
|
||||||
globOptions: {
|
filter: (resourcePath) => {
|
||||||
ignore: ["**/*.ts", "**/*.tsx"],
|
return !resourcePath.match(/\.(tsx|ts)?$/);
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Copy public files
|
|
||||||
from: "./src/public",
|
|
||||||
to: "./",
|
|
||||||
globOptions: {
|
|
||||||
ignore: ["**/*.ts", "**/*.tsx"],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|