From 79e4112a1e25a2f8b03f9a4da7d03b968af58f80 Mon Sep 17 00:00:00 2001 From: droak Date: Mon, 20 May 2024 13:57:22 +0100 Subject: [PATCH] base page with `gm` --- public/index.html | 34 ++++++++++++++++++++++++++++++++++ src/index.ts | 9 +++++++++ src/style.css | 3 +++ tailwind.config.js | 8 ++++++++ webpack.config.js | 24 ++++++++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 public/index.html create mode 100644 src/style.css create mode 100644 tailwind.config.js create mode 100644 webpack.config.js diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..a32068e --- /dev/null +++ b/public/index.html @@ -0,0 +1,34 @@ + + + + + + + Topology + + + + + + + + +
+ + + + diff --git a/src/index.ts b/src/index.ts index e69de29..4feb6e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -0,0 +1,9 @@ +const render = () => { + const canvas = document.getElementById("canvas"); + const base = document.createElement("div"); + canvas.appendChild(base); + base.className = "h-screen py-5 px-10"; + base.innerHTML = `gm`; +}; + +render(); diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/src/style.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..d9d8067 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,8 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["./public/index.html", "./src/**/*.{html,js,ts}"], + theme: { + extend: {}, + }, + plugins: [], +}; diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..2067600 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,24 @@ +const path = require("path"); + +module.exports = { + mode: "production", + entry: path.resolve(__dirname, "./src/index.ts"), + module: { + rules: [ + { + test: /\.ts?$/, + use: "ts-loader", + exclude: /node_modules/, + }, + ], + }, + resolve: { + extensions: [".ts", ".js"], + fallback: {}, + }, + output: { + filename: "script.js", + path: path.resolve(__dirname, "public", "static", "bundle"), + publicPath: "/static/bundle/", + }, +};