Added a bunch of boilerplate and started working on the flash documentation

This commit is contained in:
Relism
2024-12-15 03:17:07 +01:00
parent 0d2be4eecf
commit 308cf0971d
25 changed files with 597 additions and 94 deletions
+29
View File
@@ -0,0 +1,29 @@
import fs from 'fs'
import path from 'path'
import { fileURLToPath } from 'url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
console.log('Starting composer.js execution')
const projects = ['flash', 'mobot', 'serverlibraries']
const sidebarConfig = {}
projects.forEach(project => {
const sidebarPath = path.resolve(__dirname, `./${project}/config/sidebar.json`)
console.log(`Checking for sidebar.json in ${project}`)
if (fs.existsSync(sidebarPath)) {
console.log(`Found sidebar.json in ${project}`)
const sidebar = JSON.parse(fs.readFileSync(sidebarPath, 'utf-8'))
Object.assign(sidebarConfig, sidebar)
} else {
console.log(`sidebar.json not found in ${project}`)
}
})
// Log the contents of sidebarConfig for debugging
console.log('Final sidebarConfig:', JSON.stringify(sidebarConfig, null, 2))
export default sidebarConfig