Previous: Contribution guidelines | Next: Notes for Box employees
This project has a few prerequisites.
Git
to download the source codeNode.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 withnpm i -g yarn
if Node is installed.
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.
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
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.
To compile the content, run the following command.
yarn build
This will push the sanitized and cleaned up content to the ./compiled
folder.
To test the compiler, run the following command.
yarn test