# Scripts definition

<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>

Every script is taking a part of auto-generating data content on the website.

There are 3 rules:

1. `extract-*-tokens.js` scripts always goes first.
2. Order of other scripts when they fire don't matter after that step.
3. `clean-invalid-data-files.js` always goes last.

| script                        | description                                                                          |
| ----------------------------- | ------------------------------------------------------------------------------------ |
| `extract-*-tokens.js`         | Converts `.yml` token files to `.json` format                                        |
| `build-indexed-search.js`     | Refines extracted data to retain only what is necessary for the `search input`       |
| `build-paths.js`              | Refines extracted data to retain only what is necessary for the `sidebar navigation` |
| `clean-invalid-data-files.js` | Removes files that have had their `file name` updated                                |
