1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-01-16 13:51:23 +01:00

Rearrange JSON files

This commit is contained in:
Kamran Ahmed 2023-01-18 19:47:47 +04:00
parent 89a436a5b7
commit 8f8e2f41d8
61 changed files with 36 additions and 30 deletions

View File

@ -2,13 +2,18 @@ const fs = require('node:fs');
const path = require('node:path');
const jsonsDir = path.join(process.cwd(), 'public/jsons');
const jsonFiles = fs.readdirSync(jsonsDir);
const childJsonDirs = fs.readdirSync(jsonsDir);
jsonFiles.forEach((jsonFileName) => {
console.log(`Compressing ${jsonFileName}...`);
childJsonDirs.forEach((childJsonDir) => {
const fullChildJsonDirPath = path.join(jsonsDir, childJsonDir);
const jsonFiles = fs.readdirSync(fullChildJsonDirPath);
const jsonFilePath = path.join(jsonsDir, jsonFileName);
const json = require(jsonFilePath);
jsonFiles.forEach((jsonFileName) => {
console.log(`Compressing ${jsonFileName}...`);
fs.writeFileSync(jsonFilePath, JSON.stringify(json));
const jsonFilePath = path.join(fullChildJsonDirPath, jsonFileName);
const json = require(jsonFilePath);
fs.writeFileSync(jsonFilePath, JSON.stringify(json));
});
});

View File

@ -82,7 +82,7 @@ function prepareDirTree(control, dirTree, dirSortOrders) {
return { dirTree, dirSortOrders };
}
const roadmap = require(path.join(__dirname, `../public/jsons/${roadmapId}`));
const roadmap = require(path.join(__dirname, `../public/jsons/roadmaps/${roadmapId}`));
const controls = roadmap.mockup.controls.control;
// Prepare the dir tree that we will be creating and also calculate the sort orders

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
---
# jsonUrl: "/jsons/android.json"
# jsonUrl: "/jsons/roadmaps/android.json"
pdfUrl: "/pdfs/android.pdf"
order: 4
featuredTitle: "Android"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/angular.json"
jsonUrl: "/jsons/roadmaps/angular.json"
pdfUrl: "/pdfs/angular.pdf"
order: 3
featuredTitle: "Angular"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/aspnet-core.json"
jsonUrl: "/jsons/roadmaps/aspnet-core.json"
pdfUrl: "/pdfs/aspnet-core.pdf"
order: 9
featuredTitle: "ASP.NET Core"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/backend.json"
jsonUrl: "/jsons/roadmaps/backend.json"
pdfUrl: "/pdfs/backend.pdf"
order: 2
featuredTitle: "Backend"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/blockchain.json"
jsonUrl: "/jsons/roadmaps/blockchain.json"
pdfUrl: "/pdfs/blockchain.pdf"
order: 6
featuredTitle: "Blockchain"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/computer-science.json"
jsonUrl: "/jsons/roadmaps/computer-science.json"
pdfUrl: "/pdfs/computer-science.pdf"
order: 1
featuredTitle: "Computer Science"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/design-system.json"
jsonUrl: "/jsons/roadmaps/design-system.json"
pdfUrl: "/pdfs/design-system.pdf"
order: 13
featuredTitle: "Design System"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/devops.json"
jsonUrl: "/jsons/roadmaps/devops.json"
pdfUrl: "/pdfs/devops.pdf"
order: 3
featuredTitle: "DevOps"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/flutter.json"
jsonUrl: "/jsons/roadmaps/flutter.json"
pdfUrl: "/pdfs/flutter.pdf"
order: 10
featuredTitle: "Flutter"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/frontend.json"
jsonUrl: "/jsons/roadmaps/frontend.json"
pdfUrl: "/pdfs/frontend.pdf"
order: 1
featuredTitle: "Frontend"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/golang.json"
jsonUrl: "/jsons/roadmaps/golang.json"
pdfUrl: "/pdfs/golang.pdf"
order: 8
featuredTitle: "Go"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/graphql.json"
jsonUrl: "/jsons/roadmaps/graphql.json"
pdfUrl: "/pdfs/graphql.pdf"
order: 12
featuredTitle: "GraphQL"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/java.json"
jsonUrl: "/jsons/roadmaps/java.json"
pdfUrl: "/pdfs/java.pdf"
order: 9
featuredTitle: "Java"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/javascript.json"
jsonUrl: "/jsons/roadmaps/javascript.json"
pdfUrl: "/pdfs/javascript.pdf"
order: 5
featuredTitle: "JavaScript"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/nodejs.json"
jsonUrl: "/jsons/roadmaps/nodejs.json"
pdfUrl: "/pdfs/nodejs.pdf"
order: 6
featuredTitle: "Node.js"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/python.json"
jsonUrl: "/jsons/roadmaps/python.json"
pdfUrl: "/pdfs/python.pdf"
order: 7
featuredTitle: "Python"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/qa.json"
jsonUrl: "/jsons/roadmaps/qa.json"
pdfUrl: "/pdfs/qa.pdf"
order: 7
featuredTitle: "QA"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/react.json"
jsonUrl: "/jsons/roadmaps/react.json"
pdfUrl: "/pdfs/react.pdf"
order: 2
featuredTitle: "React"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/software-architect.json"
jsonUrl: "/jsons/roadmaps/software-architect.json"
pdfUrl: "/pdfs/software-architect.pdf"
order: 8
featuredTitle: "Software Architect"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/software-design-architecture.json"
jsonUrl: "/jsons/roadmaps/software-design-architecture.json"
pdfUrl: "/pdfs/software-design-architecture.pdf"
order: 12
featuredTitle: "Design and Architecture"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/spring-boot.json"
jsonUrl: "/jsons/roadmaps/spring-boot.json"
pdfUrl: "/pdfs/spring-boot.pdf"
order: 10
featuredTitle: "Spring Boot"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/system-design.json"
jsonUrl: "/jsons/roadmaps/system-design.json"
pdfUrl: "/pdfs/system-design.pdf"
order: 11
featuredTitle: "System Design"

View File

@ -1,5 +1,5 @@
---
jsonUrl: "/jsons/vue.json"
jsonUrl: "/jsons/roadmaps/vue.json"
pdfUrl: "/pdfs/vue.pdf"
order: 4
featuredTitle: "Vue"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 KiB

After

Width:  |  Height:  |  Size: 555 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 800 KiB

After

Width:  |  Height:  |  Size: 801 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 KiB

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 KiB

After

Width:  |  Height:  |  Size: 538 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 KiB

After

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1006 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 KiB

After

Width:  |  Height:  |  Size: 331 KiB