Skip to content

otociulis/keystone-sapper-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version

KeystoneJS Sapper App

A KeystoneJS App to serve Sapper development framework.

Installation

Using npm:

npm i keystone-app-sapper

Usage

index.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) 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 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published