Setting up a development environment#
This page describes how to set up a development environment for Squareone and the common development tasks.
To get the Squareone codebase, fork the Squareone repository if you’re an external contributor, or clone it if you’re a member of the repository or SQuaRE:
git clone https://github.com/lsst-sqre/squareone
Node.js#
Squareone uses Node.js. To get a version of Node.js that matches how we run Squareone in CI and production, use nvm. First, follow the nvm installation documentation then activate the node environment in a cloned Squareone repository:
nvm use
Tip
The node version is defined by the .nvmrc
file in the Squareone repository.
pnpm#
Squareone uses pnpm to manage Node.js dependencies. See the pnpm installation documentation to install it.
Configure pnpm to use packages from @lsst-sqre#
Squareone uses npm packages published to the GitHub Package Registry in the lsst-sqre
org.
Although they’re publicly-available, you will need a GitHub Personal Access Token with read:packages
.
Add an @lsst-sqre
registry entry to your ~/.npmrc
file using the token you created:
@lsst-sqre:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=<...>
Install Squareone dependencies#
Install the JavaScript packages:
pnpm install
When you install the Squareone package, it will also install the Husky-based pre-commit hooks that lint the codebase.
Next steps#
See Development tasks for common development tasks.