# Contributing (scripts)

<figure><img src="https://694473604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOzA1rSlMPE3i2X5tlqgu%2Fuploads%2FZCdzczA729HO2CsFnhUE%2Fimage.png?alt=media&#x26;token=3373666c-de2d-4ae5-985d-8c0be1fbeadd" alt="" width="200"><figcaption><p>exile.watch logo</p></figcaption></figure>

## [Prerequisites](https://docs.exile.watch/development/prerequisites)

## Development

### 1. [Fork @exile-watch/nucleus repo](https://github.com/exile-watch/nucleus)

### 2. [Create GitHub PAT token](https://docs.exile.watch/development/generating-github-pat)

### 3. [Create .npmrc file](https://docs.exile.watch/development/.npmrc-file)&#x20;

### 4. Install dependencies

```bash
# project root
$: nvm use # uses node version that's defined in .nvmrc
$: npm i # install dependencies
```

### 5. Check changes made in [nucleus](https://docs.exile.watch/projects/nucleus) package locally in [crucible](https://docs.exile.watch/projects/crucible) project

#### a) Create [nucleus](https://docs.exile.watch/projects/nucleus) package link

<pre class="language-bash"><code class="lang-bash"><strong># @exile-watch/nucleus project
</strong># package path e.g. ~/nucleus/packages/encounter-data
$: npm link
</code></pre>

#### b) Build [nucleus](https://docs.exile.watch/projects/nucleus) package

<pre class="language-bash"><code class="lang-bash"><strong># @exile-watch/nucleus project
</strong># package path e.g. ~/nucleus/packages/encounter-data
$: npm run build
</code></pre>

#### c) Link [nucleus](https://docs.exile.watch/projects/nucleus) package in [crucible](https://docs.exile.watch/projects/crucible) project

<pre class="language-bash"><code class="lang-bash"><strong># @exile-watch/crucible project
</strong># root path ~/crucible
$: npm link @exile-watch/encounter-data #
</code></pre>

### 6. Conclusion

Not happy with the change? \
Repeat step [#b-build-nucleus-package](#b-build-nucleus-package "mention") and [#c-link-nucleus-package-in-crucible-project](#c-link-nucleus-package-in-crucible-project "mention")

Happy with the change? \
Create a new pull request and don't forget to locally unlink modified package:

<pre class="language-bash"><code class="lang-bash"><strong># @exile-watch/nucleus project
</strong># package path e.g. ~/nucleus/packages/encounter-data
$: npm unlink
</code></pre>

<pre class="language-bash"><code class="lang-bash"><strong># @exile-watch/crucible project
</strong># root path ~/crucible
$: npm i # this will "revert" linked module to the actual package 
</code></pre>
