Skip to content

Commit

Permalink
[docs] adapter-cloudflare-workers: make install instructions match ot…
Browse files Browse the repository at this point in the history
…her adapters (#2633)
  • Loading branch information
saibotsivad authored Oct 20, 2021
1 parent 5b0a4c5 commit d3440cc
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions packages/adapter-cloudflare-workers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,13 @@ SvelteKit adapter that creates a Cloudflare Workers site using a function for dy

This is very experimental; the adapter API isn't at all fleshed out, and things will definitely change.

## Basic Configuration

**You will need [Wrangler](https://developers.cloudflare.com/workers/cli-wrangler/install-update) installed on your system**

This adapter expects to find a [wrangler.toml](https://developers.cloudflare.com/workers/platform/sites/configuration) file in the project root. It will determine where to write static assets and the worker based on the `site.bucket` and `site.entry-point` settings.

Generate this file using `wrangler` from your project directory

```sh
wrangler init --site my-site-name
```
## Usage

Add the adapter to your `svelte.config.js`:
Install with `npm i -D @sveltejs/adapter-cloudflare-workers@next`, then add the adapter to your `svelte.config.js`:

```js
import adapter from '@sveltejs/adapter-cloudflare-workers';

export default {
kit: {
target: '#svelte',
Expand All @@ -28,6 +19,18 @@ export default {
};
```

## Basic Configuration

**You will need [Wrangler](https://developers.cloudflare.com/workers/cli-wrangler/install-update) installed on your system**

This adapter expects to find a [wrangler.toml](https://developers.cloudflare.com/workers/platform/sites/configuration) file in the project root. It will determine where to write static assets and the worker based on the `site.bucket` and `site.entry-point` settings.

Generate this file using `wrangler` from your project directory

```sh
wrangler init --site my-site-name
```

Now you should get some details from Cloudflare. You should get your:

1. Account ID
Expand Down

0 comments on commit d3440cc

Please sign in to comment.