Skip to content

Commit

Permalink
fix webpack step for mod.json validation
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed Sep 18, 2024
1 parent 5ffb304 commit 2082f95
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` (`<ca>`, `<cc>`, `<cd>`, `<cf>`, `<cs>`)
- 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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});
Expand Down

0 comments on commit 2082f95

Please sign in to comment.