mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Move Stork toml build into build-lists
This commit is contained in:
parent
1c25b19e74
commit
c0dbaf88f9
2 changed files with 13 additions and 4 deletions
|
|
@ -25,6 +25,10 @@ import {
|
||||||
} from './helpers/app-derived.js'
|
} from './helpers/app-derived.js'
|
||||||
import { makeSearchableList } from './helpers/searchable-list.js'
|
import { makeSearchableList } from './helpers/searchable-list.js'
|
||||||
|
|
||||||
|
import {
|
||||||
|
writeStorkToml
|
||||||
|
} from './helpers/stork/toml.js'
|
||||||
|
|
||||||
// Setup dotenv
|
// Setup dotenv
|
||||||
dotenv.config()
|
dotenv.config()
|
||||||
|
|
||||||
|
|
@ -535,10 +539,15 @@ class BuildLists {
|
||||||
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`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save sitemap endpoints
|
const sitemapEndpoints = 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)
|
||||||
|
|
||||||
|
// Save sitemap endpoints
|
||||||
|
await this.saveToJson( sitemapEndpoints, './static/sitemap-endpoints.json')
|
||||||
|
|
||||||
|
// Save stork toml index
|
||||||
|
await writeStorkToml( sitemapEndpoints )
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Total Nuxt Endpoints', this.endpointMaps.nuxt.size )
|
console.log('Total Nuxt Endpoints', this.endpointMaps.nuxt.size )
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
"precommit": "npm run lint",
|
"precommit": "npm run lint",
|
||||||
"clone-readme": "cp ./README.md README-temp.md",
|
"clone-readme": "cp ./README.md README-temp.md",
|
||||||
"cloudflare-deploy": "npm run build-api",
|
"cloudflare-deploy": "npm run build-api",
|
||||||
"vercel-build": "npm run build-lists-and-api && npm run build-stork && npm run test-postbuild-api",
|
"vercel-build": "npm run build-lists-and-api && npm run test-postbuild-api",
|
||||||
"netlify-build": "npm run test-prebuild-functions && npm run generate-astro"
|
"netlify-build": "npm run test-prebuild-functions && npm run generate-astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue