[WIP] algolia indexing rewrite: cleaned up indexing file
This commit is contained in:
committed by
fabioberger
parent
f73bad5c13
commit
5c44163d68
@@ -6,14 +6,12 @@ const args = process.argv.slice(2);
|
||||
|
||||
function processIndices(indices: string[]): void {
|
||||
for (const indexName of indices) {
|
||||
indexFilesAsync(indexName);
|
||||
void indexFilesAsync(indexName);
|
||||
}
|
||||
}
|
||||
|
||||
if (args.length > 0) {
|
||||
// Use args given to process and push to algolia
|
||||
processIndices(args);
|
||||
processIndices(args); // Use args given to process and push to algolia
|
||||
} else {
|
||||
// Process and push all indices
|
||||
processIndices(Object.getOwnPropertyNames(searchIndices));
|
||||
processIndices(Object.getOwnPropertyNames(searchIndices)); // Process and push all indices
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user