Follow these steps to get the developer environment up and running:
The ArDrive Price Calculator uses PNPM, so install the latest version with the pnpm install instructions. In most cases:
# Brew:
brew install pnpm
# Or with NPM:
npm install -g pnpm
We also use husky to manage the git commit hooks that help to improve the quality of our commits. Without installing husky, you risk committing non-compliant code to the repository.
Using husky triggers two pre-commit hooks. The first will run lint-staged
on each staged file, which includes running prettier to format, eslint for linting, and also tsc-files for quickly checking that TypeScript can compile the code. The second hook will test the codebase prior to committing, ensuring that all tests must pass.
To enable hooks locally, you will need to run:
pnpm husky install
This repository uses NVM and an .nvmrc
file to lock the Node version to the current version used by ardrive-core-js
.
Note for Windows: We recommend using WSL for setting up NVM on Windows using the instructions described here
Follow these steps to get NVM up and running on your system:
- Install NVM using these installation instructions.
- Navigate to this project's root directory
- Ensure that the correct version of Node is installed by performing:
nvm install
- Every time you start a new terminal session or switch to this project from another NPM project, you should set the correct version of Node by running:
nvm use
To ensure your environment is compatible, we also recommend the following VSCode extensions:
Runs the app in the development mode. Open http://localhost:8080 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Builds a static copy of your site to the dist/
folder.
Your app is ready to be deployed!
Launches the application test runner.
Runs the production build locally