Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (47 sloc) 2.24 KB

De Voorhoede Playbook

Travis Build Status David Dependencies Status LGTM Grade Netlify Status

Playbook in the form of a website generated with Vuepress and fetched Dropbox Paper documents.

Development

Quick start

Initial setup

git clone git@github.com:voorhoede/playbook.git
cd playbook
npm ci

Set environment

All needed environment variables are listed in the .env.example file. To automatically set them fill in a .env file following the same structure as the example file.

cp .env.example .env

Running

Development

Fetch content and start local server to preview the website.

npm start

Production

npm run docs:content
npm run docs:build

Codebase overview

Structure

  • src contains the logic needed to fetch & transform content before building.
  • docs/.vuepress contains Vuepress configuration and front-end assets.

Because Vuepress does not support asynchronous configuration the fetching content and building the website is seperated. Which means the needed sidebar data is written to a temporary file so it can be synchronously read from docs/.vuepress/config.js.

Testing

Unit tests are present in each file matching the implementation filename ending with .test.js and are ran with: npm test.

Style

The code is written in a functional style using Sanctuary to provide simple, pure functions with no need for null checks.