1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-01-17 06:08:36 +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 path = require('node:path');
const jsonsDir = path.join(process.cwd(), 'public/jsons'); const jsonsDir = path.join(process.cwd(), 'public/jsons');
const jsonFiles = fs.readdirSync(jsonsDir); const childJsonDirs = fs.readdirSync(jsonsDir);
jsonFiles.forEach((jsonFileName) => { childJsonDirs.forEach((childJsonDir) => {
console.log(`Compressing ${jsonFileName}...`); const fullChildJsonDirPath = path.join(jsonsDir, childJsonDir);
const jsonFiles = fs.readdirSync(fullChildJsonDirPath);
const jsonFilePath = path.join(jsonsDir, jsonFileName); jsonFiles.forEach((jsonFileName) => {
const json = require(jsonFilePath); 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 }; 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; const controls = roadmap.mockup.controls.control;
// Prepare the dir tree that we will be creating and also calculate the sort orders // 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" pdfUrl: "/pdfs/android.pdf"
order: 4 order: 4
featuredTitle: "Android" featuredTitle: "Android"

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
--- ---
jsonUrl: "/jsons/computer-science.json" jsonUrl: "/jsons/roadmaps/computer-science.json"
pdfUrl: "/pdfs/computer-science.pdf" pdfUrl: "/pdfs/computer-science.pdf"
order: 1 order: 1
featuredTitle: "Computer Science" 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" pdfUrl: "/pdfs/design-system.pdf"
order: 13 order: 13
featuredTitle: "Design System" featuredTitle: "Design System"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
--- ---
jsonUrl: "/jsons/software-architect.json" jsonUrl: "/jsons/roadmaps/software-architect.json"
pdfUrl: "/pdfs/software-architect.pdf" pdfUrl: "/pdfs/software-architect.pdf"
order: 8 order: 8
featuredTitle: "Software Architect" 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" pdfUrl: "/pdfs/software-design-architecture.pdf"
order: 12 order: 12
featuredTitle: "Design and Architecture" 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" pdfUrl: "/pdfs/spring-boot.pdf"
order: 10 order: 10
featuredTitle: "Spring Boot" 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" pdfUrl: "/pdfs/system-design.pdf"
order: 11 order: 11
featuredTitle: "System Design" featuredTitle: "System Design"

View File

@ -1,5 +1,5 @@
--- ---
jsonUrl: "/jsons/vue.json" jsonUrl: "/jsons/roadmaps/vue.json"
pdfUrl: "/pdfs/vue.pdf" pdfUrl: "/pdfs/vue.pdf"
order: 4 order: 4
featuredTitle: "Vue" 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