Skip to content

Commit c8ed60c

Browse files
committed
generate a funny
1 parent 136abc7 commit c8ed60c

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.DS_Store

2 KB
Binary file not shown.

.github/.DS_Store

0 Bytes
Binary file not shown.

.github/workflows/static.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,52 @@ jobs:
254254
}
255255
'
256256
257+
- name: Generate Extensions Metadata
258+
run: |
259+
node -e '
260+
const fs = require("fs");
261+
const path = require("path");
262+
263+
// Read files from directories
264+
const featuredDir = "featured";
265+
const imagesDir = "images";
266+
const versionsFile = "versions.json";
267+
268+
// Read versions data
269+
const versions = JSON.parse(fs.readFileSync(versionsFile, "utf8"));
270+
271+
// Get featured files data
272+
const extensions = fs.readdirSync(featuredDir)
273+
.filter(file => file.endsWith(".js"))
274+
.map(file => {
275+
const filePath = path.join(featuredDir, file);
276+
const stats = fs.statSync(filePath);
277+
const name = file.split(".")[0];
278+
const imagePath = path.join(imagesDir, name + ".png");
279+
280+
return {
281+
slug: name.toLowerCase(),
282+
id: name,
283+
name: name,
284+
description: "",
285+
image: `images/${name}.png`,
286+
by: [{
287+
name: "Mistium",
288+
link: "https://github.com/Mistium"
289+
}]
290+
};
291+
});
292+
293+
// Create the metadata object
294+
const metadata = {
295+
extensions: extensions
296+
};
297+
298+
// Write the metadata file
299+
fs.writeFileSync("generated-metadata/extensions-v0.json", JSON.stringify(metadata, null, 2));
300+
console.log("Successfully generated extensions metadata file");
301+
'
302+
257303
- name: Setup Pages
258304
uses: actions/configure-pages@v5
259305

0 commit comments

Comments
 (0)