build(deps): bump glob from 7.2.0 to 10.2.7 (#10377)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthew Peveler <matt.peveler@gmail.com>
This commit is contained in:
dependabot[bot]
2023-07-06 08:47:20 -07:00
committed by GitHub
parent f82310bb5d
commit 6260eba27c
3 changed files with 51 additions and 208 deletions

View File

@@ -2,7 +2,7 @@
'use strict';
const glob = require('glob');
const { glob } = require('glob');
function parsePlatform(pagefile) {
return pagefile.split(/\//)[1];
@@ -71,13 +71,14 @@ function saveIndex(index) {
console.log(JSON.stringify(indexFile));
}
glob('pages*/**/*.md', function (er, files) {
if (er !== null) {
console.error('ERROR finding pages!');
console.error(er);
return;
}
(async () => {
const files = await glob('pages*/**/*.md');
let index = buildPagesIndex(files);
saveIndex(index);
})().then(() => {
process.exit(0);
}).catch((err) => {
console.error('ERROR building index!');
console.error(er);
process.exit(1);
});