Skip to content

Commit

Permalink
Fix Quick Edit and Devtools builds (#3864)
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa authored Aug 29, 2023
1 parent abfdbb4 commit c8f1e5f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions packages/quick-edit-extension/scripts/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ type BuildFlags = {

async function buildMain(flags: BuildFlags = {}) {
const options: esbuild.BuildOptions = {
watch: flags.watch,
entryPoints: ["./src/extension.ts"],
bundle: true,
outfile: "./dist/extension.js",
Expand Down Expand Up @@ -40,7 +39,12 @@ async function buildMain(flags: BuildFlags = {}) {
},
],
};
await esbuild.build(options);
if (flags.watch) {
const ctx = await esbuild.context(options);
await ctx.watch();
} else {
await esbuild.build(options);
}
}

async function run() {
Expand Down
5 changes: 1 addition & 4 deletions packages/wrangler-devtools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ devtools-frontend/out/Default/gen/front_end: devtools-frontend
cd devtools-frontend && PATH=$(PATH_WITH_DEPOT) $(ROOT)/depot/gn gen out/Default
cd devtools-frontend && PATH=$(PATH_WITH_DEPOT) $(ROOT)/depot/autoninja -C out/Default

node_modules:
npm ci

publish: node_modules devtools-frontend/out/Default/gen/front_end
publish: devtools-frontend/out/Default/gen/front_end
npx wrangler pages deploy --project-name cloudflare-devtools devtools-frontend/out/Default/gen/front_end

cleanup:
Expand Down

0 comments on commit c8f1e5f

Please sign in to comment.