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 072acda..51d747d 100755 Binary files a/velesresearch/website_template/bun.lockb and b/velesresearch/website_template/bun.lockb differ 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 @@ +