A template for kick starting a Cloudflare worker project with esbuild.
src/index.mjs
is the content of the Workers script.
To generate using wrangler
wrangler generate projectname https://github.com/pew/cloudflare-workers-esbuild-template
Further documentation for Wrangler can be found here.
available via `npm run-script`:
build
esbuild src/index.mjs --format=esm --bundle --minify --outfile=dist/index.mjs
format
prettier --write '**/*.{mjs,js,css,json,md,ts}'
lint
eslint --fix '**/*.{mjs,js,ts}'