Skip to content

Commit

Permalink
Support comments in extensions.json (#1304)
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin authored Feb 18, 2024
1 parent 5230e87 commit 5212671
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion development/builder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const fs = require("fs");
const AdmZip = require("adm-zip");
const pathUtil = require("path");
const ExtendedJSON = require("@turbowarp/json");
const compatibilityAliases = require("./compatibility-aliases");
const parseMetadata = require("./parse-extension-metadata");
const { mkdirp, recursiveReadDirectory } = require("./fs-utils");
Expand Down Expand Up @@ -679,7 +680,7 @@ class Builder {
build() {
const build = new Build(this.mode);

const featuredExtensionSlugs = JSON.parse(
const featuredExtensionSlugs = ExtendedJSON.parse(
fs.readFileSync(
pathUtil.join(this.extensionsRoot, "extensions.json"),
"utf-8"
Expand Down
3 changes: 2 additions & 1 deletion extensions/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
// This file supports comments
"lab/text",
"stretch",
"gamepad",
Expand Down Expand Up @@ -86,5 +87,5 @@
"itchio",
"gamejolt",
"obviousAlexC/newgroundsIO",
"Lily/McUtils"
"Lily/McUtils" // McUtils should always be the last item.
]
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"homepage": "https://github.com/TurboWarp/extensions#readme",
"dependencies": {
"@turbowarp/scratchblocks": "^3.6.4",
"@turbowarp/json": "^0.1.2",
"@turbowarp/types": "git+https://github.com/TurboWarp/types-tw.git#tw",
"adm-zip": "^0.5.10",
"chokidar": "^3.6.0",
Expand Down

0 comments on commit 5212671

Please sign in to comment.