From 20e82a0c506f7f46c7c393d85773d16e926fa94e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20J=C4=99drusiak?= Date: Mon, 21 Oct 2024 21:07:55 +0200 Subject: [PATCH] 0.3.2 --- NEWS.md | 6 +++ velesresearch/models.py | 2 + velesresearch/website_template/bun.lockb | Bin 24889 -> 25577 bytes velesresearch/website_template/package.json | 1 + .../website_template/public/index.html | 1 + .../website_template/public/reload.js | 12 ++++++ velesresearch/website_template/server.ts | 36 ++++++++++++++++-- 7 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 velesresearch/website_template/public/reload.js diff --git a/NEWS.md b/NEWS.md index 5a50177..64cadf6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,12 @@ ## future release +## 0.3.2 + +* Moved building code to a .ts file. +* Extensively changed the development server so building now happens only when invoked by the user and the window reloads automatically when the survey is updated. +* The node_modules folder is not copied even if it exists in the website_template folder for any reason. + ## 0.3.0 * Added a functional `index.css` file. diff --git a/velesresearch/models.py b/velesresearch/models.py index ba61370..0c56cf0 100644 --- a/velesresearch/models.py +++ b/velesresearch/models.py @@ -980,6 +980,8 @@ def build(self, path: str | Path = os.getcwd(), folderName: str = "survey"): # main file structure if not os.path.exists(path / "package.json"): template = str(files("velesresearch.website_template")) + if "node_modules" in template: + template.remove("node_modules") shutil.copytree( template, path, diff --git a/velesresearch/website_template/bun.lockb b/velesresearch/website_template/bun.lockb index 072acda656a29b4b640916c52dc754aed2e4a9a4..51d747dadd93c92e5a5a37ff5adb1cd6a5cb2726 100755 GIT binary patch delta 2084 zcmd^=Z%kWN6u|F&w6sOK(myPHgN?!xV9>tOLTL-5r7i6?-heVcbdVt;EL$N2ZCuvH zL|6oeGNX88LZjIhKDcCwiRtE?$^OJYu*{h_qlPA$IHTFnL=wY{$xQX!wl98}OH8I; zJn66Jo_o)`_uO~iJ?G*Fbak1&B5a#^Cb5z@EDEW8!^$L=S50^A&mXhYnV-A18dHu< z3q6A*BZ1jS8F#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FC5l_8|%TECSv2fx|Gn1xZL3ZahGnr=pAuxP66 zr;42lv}`q_-YaK|*Z__lP zwUhi&pgXkzY*|VZlp&-mMVPwKdo9xc1D!dkv~52JI!L>f9r@o3v^rYy%>XfboY%sz zJqe0k51-Jhhj2|2UZFQ$6Xy*ukKRa)9(Kub?u9Wq2`#c7bdEUp!%jyM7SNkOF9_V3 zgewlcy5AYqsnfM53-iO7f0V*-FXFc>ea{#*h6wF-C;}Uz-FiC1w9F>N4x`b%Wmc@w zMaNsuwjgvMF(WYvF(JiJ(pYMtquq*7Dxl-t6Tt%QQWS@+Fom#6d*wkIkU9ic-1t?d znu63LUL=6{5WlAMx3f`n(5}VdPVBjQv&p>*aueI?1~IwfGcbAPW0Ulu?}5P683?~z z&d*2R9(Zy}d{ZuPm+X?aIvJZ1;b6jCx}3O&9ed7JO!ylFe$4HZU2a(^hOtD6FeAe4 zgu7rtyP`@PZk_~%?e<*y5m4HlmGfH8A5>}|^WL>fU37iX#yZl%3Ver^fXxNdF|&HP Q{Y4QJ?aNbzj+Z$<02D9SF8}}l diff --git a/velesresearch/website_template/package.json b/velesresearch/website_template/package.json index 4278587..ad75bfd 100644 --- a/velesresearch/website_template/package.json +++ b/velesresearch/website_template/package.json @@ -10,6 +10,7 @@ "@types/react": "^18.3.11", "@types/react-dom": "^18.3.1", "@types/showdown": "^2.0.6", + "chokidar": "^4.0.1", "esbuild": "^0.24.0", "hono": "^4.6.5", "mustache": "^4.2.0" diff --git a/velesresearch/website_template/public/index.html b/velesresearch/website_template/public/index.html index 8891e5f..202effd 100644 --- a/velesresearch/website_template/public/index.html +++ b/velesresearch/website_template/public/index.html @@ -6,6 +6,7 @@ +