-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f822f33
commit f43cab2
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,9 @@ | |
"private": true, | ||
"scripts": { | ||
"build": "lerna run build:alone [email protected]/web --include-dependencies --stream", | ||
"deploy:prd": "wrangler pages deploy --project-name dzcode-dot-io --directory=./public --branch main", | ||
"deploy:stg": "wrangler pages deploy --project-name stage-dot-dzcode-dot-io --directory=./public --branch main", | ||
"generate:config": "npx tsx scripts/generate-config.ts", | ||
"deploy:prd": "npm run generate:config -- production && wrangler pages deploy --branch main", | ||
"deploy:stg": "npm run generate:config -- staging && wrangler pages deploy --branch main", | ||
"dev": "npm run build && wrangler pages dev . --port 8080", | ||
"dev:prepare": "npm run build && cd .. && npm run bundle && npm run pre-deploy", | ||
"lint:eslint": "eslint --config ../../packages/tooling/eslint.config.mjs", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { writeFileSync } from "fs"; | ||
|
||
// Get the environment passed as argument | ||
const STAGE = process.argv[2]; | ||
if (!STAGE) throw new Error("Please provide a STAGE"); | ||
|
||
console.log(`Creating wrangler.toml ...`); | ||
|
||
writeFileSync( | ||
"wrangler.toml", | ||
` | ||
name = ${STAGE === "production" ? '"dzcode-dot-io"' : '"stage-dot-dzcode-dot-io"'} | ||
compatibility_date = "2024-09-28" | ||
pages_build_output_dir = "./public" | ||
[vars] | ||
STAGE = "${STAGE}" | ||
`, | ||
); | ||
|
||
console.log(`Done creating .bundle-info.json`); |