Download stork executables on netlify

This commit is contained in:
Sam Carlton 2022-05-09 16:50:50 -05:00
parent 2d3bde51dd
commit d0cae3fc1b
2 changed files with 7 additions and 5 deletions

View file

@ -2,19 +2,20 @@ import fs from 'fs-extra'
import { import {
downloadStorkExecutable, downloadStorkExecutable,
writeStorkToml // writeStorkToml
} from './helpers/stork/toml.js' } from './helpers/stork/toml.js'
;(async () => { ;(async () => {
console.log( 'Downloading Stork executable...' )
await downloadStorkExecutable() await downloadStorkExecutable()
console.log( 'Building Stork index TOML...' ) // console.log( 'Building Stork index TOML...' )
// Get Sitemap Endpoints JSON // Get Sitemap Endpoints JSON
const sitemap = await fs.readJson( './static/sitemap-endpoints.json' ) // const sitemap = await fs.readJson( './static/sitemap-endpoints.json' )
await writeStorkToml( sitemap ) // await writeStorkToml( sitemap )
// From here we hand off to the Stork executable // From here we hand off to the Stork executable

View file

@ -34,6 +34,7 @@
"build-lists": "npm run test-prebuild && node -r esm -r tsconfig-paths/register build-lists.js", "build-lists": "npm run test-prebuild && node -r esm -r tsconfig-paths/register build-lists.js",
"build-stork": "node -r esm -r tsconfig-paths/register build-stork.js && npm run build-stork-index", "build-stork": "node -r esm -r tsconfig-paths/register build-stork.js && npm run build-stork-index",
"build-stork-index": "$npm_package_config_stork_executable build --input $npm_package_config_stork_toml --output $npm_package_config_stork_binary", "build-stork-index": "$npm_package_config_stork_executable build --input $npm_package_config_stork_toml --output $npm_package_config_stork_binary",
"setup-stork": "run-s build-stork build-stork-index",
"download-stork-toml": "node -r esm -r tsconfig-paths/register scripts/download-stork-toml.js", "download-stork-toml": "node -r esm -r tsconfig-paths/register scripts/download-stork-toml.js",
"dev-astro": "astro dev", "dev-astro": "astro dev",
"generate-astro": "astro build --experimental-ssr", "generate-astro": "astro build --experimental-ssr",
@ -50,7 +51,7 @@
"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 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 download-stork-toml && npm run generate-astro" "netlify-build": "run-s test-prebuild-functions download-stork-toml setup-stork generate-astro"
}, },
"dependencies": { "dependencies": {
"@11ty/eleventy-assets": "^1.0.5", "@11ty/eleventy-assets": "^1.0.5",