# keystone-app-sapper

> KeystoneJS Sapper App

Latest version **0.2.0** (published 2019-12-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install keystone-app-sapper
pnpm add keystone-app-sapper
yarn add keystone-app-sapper
bun add keystone-app-sapper
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-12-27 |
| First published | 2019-12-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Oto Ciulis |
| Maintainers | oto-ciulis |

## Links

- npm: https://www.npmjs.com/package/keystone-app-sapper
- Repository: https://github.com/otociulis/keystone-sapper-app
- npm.io page: https://npm.io/package/keystone-app-sapper

## Dependencies (2)

- [ora](https://npm.io/package/ora.md) ^4.0.3
- [sapper](https://npm.io/package/sapper.md) ^0.27.9

## Recent versions

- 0.2.0 (latest) — 2019-12-27
- 0.1.0 — 2019-12-24

## README

# KeystoneJS Sapper App

A KeystoneJS App to serve [Sapper](https://github.com/sveltejs/sapper) 
development framework.

## Usage

`index.js`

```js
const { Keystone } = require('@keystone-alpha/keystone');
const { GraphQLApp } = require('@keystone-alpha/app-graphql');
const { AdminUIApp } = require('@keystone-alpha/app-admin-ui');
const { SapperApp } = require("keystone-app-sapper");

module.exports = {
  new Keystone(),
  apps: [
    new GraphQLApp(),
    new AdminUIApp(),
    new SapperApp(),
  ],
};
```

There are two major ways to run this application (controlled by 
`skipDevelopmentBuild` flag):

* Without parallel Sapper build environment [default]
* With parallel Sapper build environment

In first case the Sapper build will be executed every time the KeystoneJS
application will restart. This prolongs development times but doesn't require
parallel development environment since it doesn't offer hot reloading by default.

In second option developer must run separate Sapper environment manually
(e.g. by executing `npm run dev` as described 
[here](https://sapper.svelte.dev/docs#Getting_started)) and only *after* that
run KeystoneJS application. This mode provides better development experience,
hot reloading of frontend application etc.

## Options

### `skipDevelopmentBuild`

Flag indicating Sapper build should be executed when Keystone is running 
in development mode (default value `false`). If set to `true` the build 
will be skipped and it's asummed that 
[Sapper develoment enviromnent](https://sapper.svelte.dev/docs#Getting_started) 
is running in parallel.

### `path`

The path to development build of Sapper (default value `__sapper__/dev`). 

### `buildOptions`

Additional options as defined by 
[Sapper build options](https://sapper.svelte.dev/docs#sapper_build).

---
_Source: https://npm.io/package/keystone-app-sapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
