Skip to content

scaife-viewer/sv-mini

Repository files navigation

SV Mini

front-end for the Scaife "SV Mini" prototype

This repository is part of the Scaife Viewer project, an open-source ecosystem for building rich online reading environments.

Prerequisites

Install project

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Run your tests

yarn run test

Lints and fixes files

yarn run lint

Customize configuration

See Configuration Reference.

NOTE: Project initialization

The following command was used to set up the initial project; it does not need to be ran again, but is provided here for reference on future projects:

vue create sv-mini -d

Routing to a local ATLAS server.

If you want to run an ATLAS server on your local machine then you can route all requests to that address by overriding the graphql endpoint, like so:

export VUE_APP_ATLAS_GRAPHQL_ENDPOINT=http://localhost:8000/graphql/

Deploying to QA instances

PRs against master will automatically be deployed to Netlify to a one-off URL, a "deploy preview".

We can take advantage of Netlify's deploy contexts to override environment variables for these deploy previews.

For example, we can override deploys of a deploy preview of the feature/ci-cd branch to point to an alternate ATLAS instance:

[context."feature/ci-cd".environment]
  VUE_APP_ATLAS_GRAPHQL_ENDPOINT = "https://sv-mini-atlas.herokuapp.com/graphql/"