Skip to content

Latest commit

 

History

History
82 lines (56 loc) · 2.23 KB

index.md

File metadata and controls

82 lines (56 loc) · 2.23 KB

Installation & setup

Previous: Contribution guidelines | Next: Notes for Box employees


Prerequisites

This project has a few prerequisites.

  • Git to download the source code
  • Node.js for compilation and linting of the API specification. Ideally Node 12 or above.
  • Yarn is the Node package manager for this project. It can be installed with npm i -g yarn if Node is installed.

Download the code

To setup this project, download the source code and prepare the environment.

git clone git@github.com:box/box-developer-changelog.git box-developer-changelog
cd box-developer-changelog
cp .env.example .env

Note that a new copy of the .env file is created. This file contains some environment variables used by various parts of the code to pull in extra content, as well as configure the content to be imported when testing imports.

Lint the content

With the dependencies installed, it is possible to lint the content. Linting validates the markdown is valid, has no spelling mistakes, and that there are no obvious incorrect links.

yarn install
yarn lint

Additionally, each of the lint steps can be run individually.

yarn lint:links # makes sure all links are valid, checking it against the guides
yarn lint:markdown # makes sure the markdown is valid markdown
yarn lint:spelling # makes sure there are no obvious spelling mistakes
yarn lint:alex # makes sure we're not using any offensive language in our content

Content compilation

The content in this project is sanitized and prettified before it can be used in our developer documentation. For this purpose, we have some custom code in ./code that adds extra spaces around markdown inside HTML, and expands in-line HTML tags.

Compiling the content

To compile the content, run the following command.

yarn build

This will push the sanitized and cleaned up content to the ./compiled folder.

Test the compiler

To test the compiler, run the following command.

yarn test

Next: Notes for Box employees