open-index/open-npm huggingface dataset:
npm package: @snuffkin/alexandria
Description: A Svelte component library.
Latest version: 0.0.1

# create-svelte

Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).

Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.

## Building

To build your library:

```bash
npm run package
```

To create a production version of your showcase app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.

## Publishing

Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).

To publish your library to [npm](https://www.npmjs.com):

```bash
npm publish
```
npm package: @snuffydev/adapter-cloudflare-cache
Description: # WARNING!
Author: snuffyDev
Latest version: 1.0.16
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# adapter-cloudflare-cache

# WARNING!

> This adapter is ***not*** considered stable, not recommended for production use.

This adapter implements SvelteKit Issue [#1771](https://github.com/sveltejs/kit/pull/1771), which adds cache configuration to Cloudflare Workers. Mainly meant to be used on my project [Beatbump](https://github.com/snuffyDev/Beatbump). I have not tested the configuration aspect, and the Intellisense info was not updated. *However*, I did update the adapter to the current latest version 1.0.0-next.17.

__*Only updates to this repo will be for bug fixes, stability, or required functionality changes.*__

### Install

```sh
npm install -D @snuffydev/adapter-cloudflare-cache
```

## Original README Below

SvelteKit adapter that creates a Cloudflare Workers site using a function for dynamic server rendering.

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

## Configuration

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
```

Then configure your sites build directory in the config file:

```toml
[site]
bucket = "./build"
entry-point = "./workers-site"
```

The adapter accepts the following configuration properties:
| property | default | description |
|---|---|---|
| `pageCacheTTL` | `null` | Sets `cache-control` `max-age` for rendered responses if not defined. WARNING: this will apply to all page/request routes, disabled by default for security reasons. |
| `staticCacheTTL` | `60 * 60 * 24 * 90` (90 days) | Sets `cache-control` `max-age` for static assets. |
| `edgeCacheTTL` | `60 * 60 * 24 * 90` (90 days) | Sets CloudFlare Edge Cache TTL for static assets. |

It's recommended that you add the `build` and `workers-site` folders (or whichever other folders you specify) to your `.gitignore`.

More info on configuring a cloudflare worker site can be found [here](https://developers.cloudflare.com/workers/platform/sites/start-from-existing)