Skip to content

Commit

Permalink
🔨 add wrangler to package.json (#3059)
Browse files Browse the repository at this point in the history
* 🔨 add wrangler to package.json

* 🐛 add esbuild to fix tsup conflict
  • Loading branch information
Marigold authored Jan 4, 2024
1 parent bf58f0a commit e1e271c
Show file tree
Hide file tree
Showing 4 changed files with 657 additions and 15 deletions.
5 changes: 4 additions & 1 deletion ops/buildkite/deploy-content
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ deploy_to_cloudflare() {
# for branch-specific non-production deploys, use `--branch master`
cd dist
# trim \r, they remove previous logs in buildkite
env $(grep "^CLOUDFLARE" ../owid-grapher/.env | xargs -0) npx wrangler pages deploy . --project-name "$PROJECT_NAME" 2>&1 | tr -d '\r'
# NOTE: using `node_modules/.bin/wrangler` would be preferable, but the current wrangler version
# raises `Error: Cannot find module '/home/owid/dist/node_modules/wrangler-dist/cli.js'`
# Fix this when possible.
env $(grep "^CLOUDFLARE" ../owid-grapher/.env | xargs -0) node_modules/wrangler/bin/wrangler.js pages deploy . --project-name "$PROJECT_NAME" 2>&1 | tr -d '\r'
)
}

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@
"tsc-watch": "^6.0.4",
"vite": "^4.4.10",
"vite-plugin-checker": "^0.6.2",
"vite-plugin-warmup": "^0.1.0"
"vite-plugin-warmup": "^0.1.0",
"wrangler": "^3.22.2"
},
"prettier": {
"trailingComma": "es5",
Expand Down
1 change: 1 addition & 0 deletions packages/@ourworldindata/grapher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"@types/url-parse": "^1.4.8",
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
"enzyme": "^3.11.0",
"esbuild": "^0.18.20",
"esbuild-sass-plugin": "^2.16.0",
"eslint": "^8.53.0",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
Loading

0 comments on commit e1e271c

Please sign in to comment.