Include sitemap and endpoint lists for api

This commit is contained in:
Sam Carlton 2022-05-09 16:29:15 -05:00
parent cd953abd45
commit a9d467bec7

View file

@ -533,7 +533,7 @@ class BuildLists {
// ['/app/chrome', this.endpointMaps.eleventy.get( '/app/chrome' )] // ['/app/chrome', this.endpointMaps.eleventy.get( '/app/chrome' )]
// ]) // ])
if ( !cliOptions.withApi ) {
for ( const [ endpointSetName, endpointSet ] of Object.entries(this.endpointMaps) ) { for ( const [ endpointSetName, endpointSet ] of Object.entries(this.endpointMaps) ) {
// Save Endpoints // Save Endpoints
await this.saveToJson(Array.from( endpointSet , ([route, payload]) => ({ route, payload })), `./static/${endpointSetName}-endpoints.json`) await this.saveToJson(Array.from( endpointSet , ([route, payload]) => ({ route, payload })), `./static/${endpointSetName}-endpoints.json`)
@ -548,7 +548,6 @@ class BuildLists {
// Save stork toml index // Save stork toml index
await writeStorkToml( sitemapEndpoints ) await writeStorkToml( sitemapEndpoints )
}
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 )