---
sidebar_position: 5
---
# Contributing
Due to the precarious nature of the Open Specifications Promise, it is very
important to ensure code is cleanroom.  [Contribution Notes](https://git.sheetjs.com/sheetjs/sheetjs/src/branch/master/CONTRIBUTING.md)
  File organization (click to show)
Folders:
| folder       | contents                                                      |
|:-------------|:--------------------------------------------------------------|
| `bin`        | server-side bin scripts (`xlsx.njs`)                          |
| `bits`       | raw source files that make up the final script                |
| `dist`       | dist files for web browsers and nonstandard JS environments   |
| `misc`       | miscellaneous supporting scripts                              |
| `modules`    | TypeScript source files that generate some of the bits        |
| `packages`   | Support libraries and tools                                   |
| `test_files` | test files (pulled from the test files repository)            |
| `tests`      | browser tests (run `make ctest` to rebuild)                   |
| `types`      | TypeScript definitions and tests                              |
 
After cloning the repo, running `make help` will display a list of commands.
## OS-Specific Setup
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
  
The MacOS/Linux workflow works in WSL.  Initial setup is involved:
1) Install mercurial and subversion.
```bash
# Install support programs for the build and test commands
sudo add-apt-repository ppa:mercurial-ppa/releases
sudo apt-get update
sudo apt-get install mercurial subversion
sudo add-apt-repository --remove ppa:mercurial-ppa/releases
```
2) Install NodeJS
```bash
# Install bootstrap NodeJS and NPM within the WSL
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
# CLOSE AND REOPEN SHELL BEFORE CONTINUING
# Switch to `n`-managed NodeJS
sudo npm i -g n
sudo n 16
```
3) Build and install a version of Git with proper SSL support:
```bash
# Git does not support OpenSSL out of the box, must do this
curl -LO https://github.com/paul-nelson-baker/git-openssl-shellscript/raw/main/compile-git-with-openssl.sh
chmod +x compile-git-with-openssl.sh
./compile-git-with-openssl.sh
```
(instructions continued in the MacOS/Linux part)
  
  
Initial setup:
0) Ensure mercurial, subversion, and NodeJS are installed. The WSL instructions
will have installed these dependencies, so WSL users can skip to step 1.
:::note
[The official NodeJS site](https://nodejs.org/en/download/) provides installers
for "LTS" and "Current" releases.  The "LTS" version should be installed.
:::
Mercurial and Subversion:
  
On Linux, install using the system package manager. Debian and Ubuntu use `apt`:
```bash
sudo apt-get install mercurial subversion
```
Other Linux distributions may use other package managers.
Steam Deck (click to show)
Desktop Mode on the Steam Deck uses `pacman`.  It also requires a few steps.
0) Switch to Desktop mode and open `Konsole`
1) Set a password for the user by running `passwd` and following instructions.
2) Disable read-only mode:
```bash
sudo steamos-readonly disable
```
(When prompted, enter the password assigned in step 1)
3) Configure keyring:
```bash
echo "keyserver hkps://keyserver.ubuntu.com" >> /etc/pacman.d/gnupg/gpg.conf
sudo pacman-key --init
sudo pacman-key --populate
sudo pacman-key --refresh-keys
```
4) Install dependencies:
```bash
yay -S base-devel mercurial subversion
```