chore: upgrade dependencies (#8468)
* Upgrade paths * Update topic rendering * Fix file names * Remove courses filepull/8471/head
parent
0d62847053
commit
82c52aca7e
1355 changed files with 452 additions and 805 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,58 @@ |
||||
import fs from 'fs'; |
||||
import path from 'path'; |
||||
|
||||
const roadmapDirs = fs.readdirSync( |
||||
path.join(__dirname, '..', 'src', 'data', 'roadmaps'), |
||||
); |
||||
|
||||
roadmapDirs.forEach((roadmapDir) => { |
||||
const roadmapDirPath = path.join( |
||||
__dirname, |
||||
'..', |
||||
'src', |
||||
'data', |
||||
'roadmaps', |
||||
roadmapDir, |
||||
'content', |
||||
); |
||||
|
||||
const roadmapDirContent = fs.readdirSync(roadmapDirPath); |
||||
|
||||
roadmapDirContent.forEach((content) => { |
||||
const contentPath = path.join(roadmapDirPath, content); |
||||
const contentStats = fs.statSync(contentPath); |
||||
|
||||
const oldName = path.basename(contentPath); |
||||
const newName = oldName.replace(/^(\d+)-/, ''); |
||||
|
||||
fs.renameSync(contentPath, path.join(roadmapDirPath, newName)); |
||||
|
||||
if (contentStats.isDirectory()) { |
||||
const contentDirContent = fs.readdirSync(contentPath); |
||||
|
||||
contentDirContent.forEach((contentDir) => { |
||||
const contentDirPath = path.join(contentPath, contentDir); |
||||
const contentDirStats = fs.statSync(contentDirPath); |
||||
|
||||
const oldName = path.basename(contentDirPath); |
||||
const newName = oldName.replace(/^(\d+)-/, ''); |
||||
|
||||
fs.renameSync(contentDirPath, path.join(contentPath, newName)); |
||||
|
||||
if (contentDirStats.isDirectory()) { |
||||
const contentDirContent = fs.readdirSync(contentDirPath); |
||||
|
||||
contentDirContent.forEach((contentDir) => { |
||||
const contentDirPath2 = path.join(contentDirPath, contentDir); |
||||
const contentDirStats2 = fs.statSync(contentDirPath2); |
||||
|
||||
const oldName2 = path.basename(contentDirPath2); |
||||
const newName2 = oldName2.replace(/^(\d+)-/, ''); |
||||
|
||||
fs.renameSync(contentDirPath2, path.join(contentDirPath, newName2)); |
||||
}); |
||||
} |
||||
}); |
||||
} |
||||
}); |
||||
}); |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue