[WIP] algolia indexing rewrite: cleaned up indexing file

This commit is contained in:
Piotr Janosz
2019-08-10 16:53:43 +02:00
committed by fabioberger
parent f73bad5c13
commit 5c44163d68

View File

@@ -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
}