From 2082f95694409ff14817a80ee61340c0f4006f3b Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:36:05 -0300 Subject: [PATCH] fix webpack step for mod.json validation --- CHANGELOG.md | 1 + package.json | 2 +- webpack.config.ts | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cedbef..02fe085 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [v1.14.0] - Add preliminary linting features for settings (checks for invalid setting names) - Add support for 2.206 color tags in `FLAlertLayer` (``, ``, ``, ``, ``) + - Improve `mod.json` validation by generating it from TypeScript, along with support for Settings V3. ## [v1.13.4] - Actually include sharp binaries for all platforms, by switching to pnpm diff --git a/package.json b/package.json index 698be3a..125f869 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "geode", "displayName": "Geode", "description": "Utilities for the Geode Geometry Dash modding framework", - "version": "1.15.0", + "version": "1.14.0", "engines": { "vscode": "^1.72.0" }, diff --git a/webpack.config.ts b/webpack.config.ts index ef38660..041d3a5 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -10,13 +10,14 @@ const path = require("path"); class JsonValidationGenner { apply(compiler: Compiler) { - compiler.hooks.watchRun.tap("generate mod.json validation", () => { + compiler.hooks.compile.tap("generate mod.json validation", () => { const schema = createGenerator({ path: "./src/project/mod.ts", tsconfig: "./tsconfig.json", type: "ModJson", markdownDescription: true }).createSchema("ModJson"); + // scary to hardcode dist folder but oh well mkdirSync("./dist/validation", { recursive: true }); writeFileSync("./dist/validation/mod.json", JSON.stringify(schema)); });