Add eleventy endpoints filter

This commit is contained in:
Sam Carlton 2021-07-10 22:54:31 -05:00
parent 789b526526
commit 9e7e24c681

View file

@ -313,6 +313,14 @@ class BuildLists {
// // Save Eleventy Endpoints
// await this.saveToJson(Array.from(this.endpointMaps.eleventy), './static/eleventy-endpoints.json')
// console.log('this.endpointMaps.eleventy /app/chrome', this.endpointMaps.eleventy.get( '/app/chrome' ))
// Filter eleventy endpoints
// this.endpointMaps.eleventy = new Set([
// ['/app/chrome', this.endpointMaps.eleventy.get( '/app/chrome' )]
// ])
for ( const [ endpointSetName, endpointSet ] of Object.entries(this.endpointMaps) ) {
// Save Endpoints
await this.saveToJson(Array.from( endpointSet , ([route, payload]) => ({ route, payload })), `./static/${endpointSetName}-endpoints.json`)