From fcbd0acfb2427e7b56a52d5d3bb4e00569ed7ef4 Mon Sep 17 00:00:00 2001 From: Drew Malzahn Date: Thu, 11 Jun 2026 04:14:30 +0000 Subject: [PATCH] refactor: Move source files from root into src/ Relocates book.js, fabula-ultima-sheet.css, and fabula-ultima-sheet.html into src/ to consolidate all source files under one directory. Updates webpack entry points, HTML template path, and CSS import accordingly. Co-Authored-By: Claude Sonnet 4.6 --- src/CharacterSheet.jsx | 2 +- book.js => src/book.js | 2 +- .../fabula-ultima-sheet.css | 0 src/fabula-ultima-sheet.html | 13 +++++++++++++ webpack.config.js | 4 ++-- 5 files changed, 17 insertions(+), 4 deletions(-) rename book.js => src/book.js (84%) rename fabula-ultima-sheet.css => src/fabula-ultima-sheet.css (100%) create mode 100644 src/fabula-ultima-sheet.html diff --git a/src/CharacterSheet.jsx b/src/CharacterSheet.jsx index fd1d894..1792a35 100644 --- a/src/CharacterSheet.jsx +++ b/src/CharacterSheet.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useCallback, useRef } from "react"; -import "../fabula-ultima-sheet.css"; +import "./fabula-ultima-sheet.css"; const STATUSES = ["Slow", "Enraged", "Dazed", "Weak", "Poisoned", "Shaken"]; const FEELINGS = [ diff --git a/book.js b/src/book.js similarity index 84% rename from book.js rename to src/book.js index cf160e1..2cdce55 100644 --- a/book.js +++ b/src/book.js @@ -1,6 +1,6 @@ import React from 'react'; import { createRoot } from 'react-dom/client'; -import BookIndex from './src/BookIndex.jsx'; +import BookIndex from './BookIndex.jsx'; const { title, logoText, pages } = window.__BOOK_DATA__; createRoot(document.getElementById('root')).render( diff --git a/fabula-ultima-sheet.css b/src/fabula-ultima-sheet.css similarity index 100% rename from fabula-ultima-sheet.css rename to src/fabula-ultima-sheet.css diff --git a/src/fabula-ultima-sheet.html b/src/fabula-ultima-sheet.html new file mode 100644 index 0000000..68d965b --- /dev/null +++ b/src/fabula-ultima-sheet.html @@ -0,0 +1,13 @@ + + + + + + Fabula Ultima Character Sheet + + + + +
+ + diff --git a/webpack.config.js b/webpack.config.js index ef96be8..4e927b3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -45,7 +45,7 @@ module.exports = (env, argv) => { return { entry: { sheet: "./src/sheet-main.jsx", - book: "./book.js", + book: "./src/book.js", }, output: { filename: isProd ? "[name].[contenthash].js" : "[name].js", @@ -80,7 +80,7 @@ module.exports = (env, argv) => { ? [new MiniCssExtractPlugin({ filename: "[name].[contenthash].css" })] : []), new HtmlWebpackPlugin({ - template: "./fabula-ultima-sheet.html", + template: "./src/fabula-ultima-sheet.html", filename: "index.html", chunks: ["sheet"], scriptLoading: "blocking",