Skip to content

Commit

Permalink
Remove prod flag in create-email script
Browse files Browse the repository at this point in the history
I run it manually anyway, so I might as well have it process the local
feed instead of the prod one.
  • Loading branch information
tylermercer committed Mar 4, 2025
1 parent f8e0c88 commit 2944557
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions newsletter/create-email.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ function processFeedData(feedData) {
}
}

if (argv.prod) {
// Read and process feed data from live site
fetch("https://tylermercer.net/feeds/feed.json").then(res => res.json()).then(processFeedData);
}
else {
// if (argv.prod) {
// // Read and process feed data from live site
// fetch("https://tylermercer.net/feeds/feed.json").then(res => res.json()).then(processFeedData);
// }
// else {
processFeedData(JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'dist', 'feeds', 'feed.json'), 'utf8')));
}
// }
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"build": "astro build",
"preview": "wrangler pages dev ./dist --port 4321",
"astro": "astro",
"create-email:dev": "node ./newsletter/create-email.cjs",
"create-email": "node ./newsletter/create-email.cjs --prod",
"create-email": "node ./newsletter/create-email.cjs",
"clean": "del-cli dist"
},
"dependencies": {
Expand Down

0 comments on commit 2944557

Please sign in to comment.