Formatting and other minor tweaks
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"tabWidth": 4
|
||||
"tabWidth": 4,
|
||||
"proseWrap": "always"
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
# Cloudflare Workers
|
||||
|
||||
Source code for our [Cloudflare
|
||||
Workers](https://developers.cloudflare.com/workers/).
|
||||
Source code for our
|
||||
[Cloudflare Workers](https://developers.cloudflare.com/workers/).
|
||||
|
||||
Each worker is a self contained directory with its each `package.json`.
|
||||
|
||||
## Deploying
|
||||
|
||||
* Switch to a worker directory, e.g. `cd github-discord-notifier`.
|
||||
- Switch to a worker directory, e.g. `cd github-discord-notifier`.
|
||||
|
||||
* Install dependencies (if needed) with `yarn`
|
||||
- Install dependencies (if needed) with `yarn`
|
||||
|
||||
* Login into wrangler (if needed) using `yarn wrangler login`
|
||||
- Login into wrangler (if needed) using `yarn wrangler login`
|
||||
|
||||
* Deploy! `yarn wrangler deploy`
|
||||
- Deploy! `yarn wrangler deploy`
|
||||
|
||||
Wrangler is the CLI provided by Cloudflare to manage workers. Apart from
|
||||
deploying, it also allows us to stream logs from running workers by using `yarn
|
||||
wrangler tail`.
|
||||
deploying, it also allows us to stream logs from running workers by using
|
||||
`yarn wrangler tail`.
|
||||
|
||||
## Creating a new worker
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
{ "extends": "../tsconfig.base.json", "include": ["src/**/*.ts"] }
|
||||
{ "extends": "../tsconfig.base.json", "include": ["src"] }
|
||||
|
||||
@@ -1 +1 @@
|
||||
{ "extends": "../tsconfig.base.json", "include": ["src/**/*.ts"] }
|
||||
{ "extends": "../tsconfig.base.json", "include": ["src"] }
|
||||
|
||||
@@ -3,30 +3,30 @@
|
||||
/* TSConfig docs: https://aka.ms/tsconfig.json */
|
||||
"compilerOptions": {
|
||||
/* tsc is used for by us for type checking, not compilation (the
|
||||
Cloudflare workers runtime natively supports TypeScript) */
|
||||
Cloudflare workers runtime natively supports TypeScript). */
|
||||
"noEmit": true,
|
||||
|
||||
/* The Workers runtime supports the latest and greatest */
|
||||
/* The Workers runtime supports the latest and greatest. */
|
||||
/* https://developers.cloudflare.com/workers/reference/languages/#javascript--typescript */
|
||||
"lib": ["esnext"],
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
|
||||
/* Types that are implicitly available */
|
||||
/* Types that are implicitly available. */
|
||||
/* https://www.npmjs.com/package/@cloudflare/workers-types */
|
||||
"types": ["@cloudflare/workers-types"],
|
||||
|
||||
/* Tell TypeScript how to lookup the file for a given import */
|
||||
/* Tell TypeScript how to lookup the file for a given import. */
|
||||
"moduleResolution": "node",
|
||||
|
||||
/* Speed things up by not type checking `node_modules` */
|
||||
/* Speed things up by not type checking `node_modules`. */
|
||||
"skipLibCheck": true,
|
||||
/* Require the `type` modifier when importing types */
|
||||
/* Require the `type` modifier when importing types. */
|
||||
"verbatimModuleSyntax": true,
|
||||
/* Enable importing .json files */
|
||||
/* Enable importing .json files. */
|
||||
"resolveJsonModule": true,
|
||||
|
||||
/* strict and then some */
|
||||
/* strict, and then some. */
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedParameters": true,
|
||||
|
||||
Reference in New Issue
Block a user