Build lists on Vercel

This commit is contained in:
Sam Carlton 2022-04-25 14:46:09 -05:00
parent 1d5df0a193
commit 06da49cb4a
2 changed files with 8 additions and 4 deletions

View file

@ -26,7 +26,10 @@ import { makeSearchableList } from './helpers/searchable-list.js'
dotenv.config()
const commandArguments = process.argv
const withApi = commandArguments.includes('--with-api')
const noLists = commandArguments.includes('--no-lists')
@ -169,7 +172,7 @@ class BuildLists {
// Run all listsOprions methods
// and store them to this.lists
async buildLists () {
console.log('Build Lists started')
console.log( 'Build Lists started', commandArguments )
for ( const listOptions of this.listsOptions ) {
@ -249,7 +252,7 @@ class BuildLists {
const listOptions = this.listsOptions[listOptionsKey]
if ( !withApi ) {
if ( noLists ) {
await this.saveList( listOptions )
}