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;
|
||||
cssfile: string;
|
||||
themecolor: string;
|
||||
path?: string;
|
||||
}
|
||||
|
||||
const APP = express();
|
||||
|
@ -23,32 +24,33 @@ const WEBSITES = [
|
|||
sitename: "index",
|
||||
title: "IEEE at UCSD",
|
||||
description: "",
|
||||
jsfile: "js/index.js",
|
||||
cssfile: "css/styles.css",
|
||||
jsfile: "assets/js/index.js",
|
||||
cssfile: "assets/css/styles.css",
|
||||
themecolor: "",
|
||||
path: "/",
|
||||
},
|
||||
{
|
||||
sitename: "events",
|
||||
title: "IEEE at UCSD",
|
||||
description: "",
|
||||
jsfile: "js/events.js",
|
||||
cssfile: "css/styles.css",
|
||||
jsfile: "assets/js/events.js",
|
||||
cssfile: "assets/css/styles.css",
|
||||
themecolor: "",
|
||||
},
|
||||
{
|
||||
sitename: "projects",
|
||||
title: "IEEE at UCSD",
|
||||
description: "",
|
||||
jsfile: "js/projects.js",
|
||||
cssfile: "css/styles.css",
|
||||
jsfile: "assets/js/projects.js",
|
||||
cssfile: "assets/css/styles.css",
|
||||
themecolor: "",
|
||||
},
|
||||
{
|
||||
sitename: "committees",
|
||||
title: "IEEE at UCSD",
|
||||
description: "",
|
||||
jsfile: "js/committees.js",
|
||||
cssfile: "css/styles.css",
|
||||
jsfile: "assets/js/committees.js",
|
||||
cssfile: "assets/css/styles.css",
|
||||
themecolor: "",
|
||||
},
|
||||
] as Website[];
|
||||
|
@ -106,8 +108,19 @@ function generateFilePages() {
|
|||
let site: Website;
|
||||
for (site of WEBSITES) {
|
||||
const html = generatePage(site.sitename);
|
||||
fs.mkdirSync(
|
||||
path.join(__dirname, "../public/", site.path ?? site.sitename),
|
||||
{
|
||||
recursive: true,
|
||||
}
|
||||
);
|
||||
fs.writeFileSync(
|
||||
path.join(__dirname, "../public/", `${site.sitename}.html`),
|
||||
path.join(
|
||||
__dirname,
|
||||
"../public/",
|
||||
site.path ?? site.sitename,
|
||||
"/index.html"
|
||||
),
|
||||
html
|
||||
);
|
||||
}
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/fonts.css" media="screen">
|
||||
<link rel="stylesheet" type="text/css" href="assets/css/fonts.css" 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="description" content="$DESCRIPTION">
|
||||
<meta name="theme-color" content="$THEMECOLOR">
|
||||
|
|
|
@ -6,7 +6,7 @@ module.exports = {
|
|||
entry: loadEntries("./src/public"),
|
||||
output: {
|
||||
path: path.resolve(__dirname, "build/public"),
|
||||
filename: "./js/[name].js",
|
||||
filename: "./assets/js/[name].js",
|
||||
},
|
||||
mode: "production",
|
||||
module: {
|
||||
|
@ -32,19 +32,11 @@ module.exports = {
|
|||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
// Copy utility files
|
||||
from: "./src/util",
|
||||
to: "../util",
|
||||
globOptions: {
|
||||
ignore: ["**/*.ts", "**/*.tsx"],
|
||||
},
|
||||
},
|
||||
{
|
||||
// Copy public files
|
||||
from: "./src/public",
|
||||
to: "./",
|
||||
globOptions: {
|
||||
ignore: ["**/*.ts", "**/*.tsx"],
|
||||
// Copy non-ts, non-tsx files
|
||||
from: "./src",
|
||||
to: "../",
|
||||
filter: (resourcePath) => {
|
||||
return !resourcePath.match(/\.(tsx|ts)?$/);
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|