mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Exclude large lists from api build
This commit is contained in:
parent
0da313b6f0
commit
921a25e758
1 changed files with 13 additions and 9 deletions
|
|
@ -249,7 +249,9 @@ class BuildLists {
|
||||||
|
|
||||||
const listOptions = this.listsOptions[listOptionsKey]
|
const listOptions = this.listsOptions[listOptionsKey]
|
||||||
|
|
||||||
await this.saveList( listOptions )
|
if ( !withApi ) {
|
||||||
|
await this.saveList( listOptions )
|
||||||
|
}
|
||||||
|
|
||||||
const searchableList = makeSearchableList( this.lists[listOptions.name] )
|
const searchableList = makeSearchableList( this.lists[listOptions.name] )
|
||||||
|
|
||||||
|
|
@ -383,15 +385,17 @@ class BuildLists {
|
||||||
// ['/app/chrome', this.endpointMaps.eleventy.get( '/app/chrome' )]
|
// ['/app/chrome', this.endpointMaps.eleventy.get( '/app/chrome' )]
|
||||||
// ])
|
// ])
|
||||||
|
|
||||||
for ( const [ endpointSetName, endpointSet ] of Object.entries(this.endpointMaps) ) {
|
if ( !withApi ) {
|
||||||
// Save Endpoints
|
for ( const [ endpointSetName, endpointSet ] of Object.entries(this.endpointMaps) ) {
|
||||||
await this.saveToJson(Array.from( endpointSet , ([route, payload]) => ({ route, payload })), `./static/${endpointSetName}-endpoints.json`)
|
// Save Endpoints
|
||||||
}
|
await this.saveToJson(Array.from( endpointSet , ([route, payload]) => ({ route, payload })), `./static/${endpointSetName}-endpoints.json`)
|
||||||
|
}
|
||||||
|
|
||||||
// Save sitemap endpoints
|
// Save sitemap endpoints
|
||||||
await this.saveToJson(Object.values(this.endpointMaps).map( endpointSet => {
|
await this.saveToJson(Object.values(this.endpointMaps).map( endpointSet => {
|
||||||
return Array.from( endpointSet , ([route, payload]) => ({ route, payload }) )
|
return Array.from( endpointSet , ([route, payload]) => ({ route, payload }) )
|
||||||
} ).flat(1), './static/sitemap-endpoints.json')
|
} ).flat(1), './static/sitemap-endpoints.json')
|
||||||
|
}
|
||||||
|
|
||||||
console.log('Total Nuxt Endpoints', this.endpointMaps.nuxt.size )
|
console.log('Total Nuxt Endpoints', this.endpointMaps.nuxt.size )
|
||||||
console.log('Total Eleventy Endpoints', this.endpointMaps.eleventy.size )
|
console.log('Total Eleventy Endpoints', this.endpointMaps.eleventy.size )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue