code: function updateSidebar() {
  
      var sidebarJSONPath = path.resolve(rootDir, srcSidebar);
      const sidebarText = fs.readFileSync(sidebarJSONPath).toString();
      var sidebarJSON = JSON.parse(sidebarText);
      sidebarJSON.docs.Packages = [];
  
      sidebarEntries
          .map((entry) => sidebarJSON.docs.Packages.push(entry))
  
      if (dryRun) {
          console.log("In website/sidebars.json, this script updates...\n" +
              "...the Packages array with the filepath to each package's index file.");
      } else {
          fs.writeFile(sidebarJSONPath, JSON.stringify(sidebarJSON, null, 2), 'utf8', (err) => {
              if (err) throw err;
              console.log(chalk.green(`${srcSidebar} was succesfully updated!`));
          }); 
      }
  
  }
docs: Updates ./website/sidebars.json