# Split up theme Javascript into multiple files

**URL:** https://meta.discourse.org/t/split-up-theme-javascript-into-multiple-files/119369
**Category:** Developer Guides
**Tags:** how-to, theme-guides
**Created:** [June 3, 2019, 10:20am UTC](https://meta.discourse.org/t/split-up-theme-javascript-into-multiple-files/119369 "2019-06-03T10:20:40Z")
**Posts on this page:** 1
**Showing post:** 37

<div class="post-metadata">

### Author: ![mdoggydog](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@mdoggydog](https://meta.discourse.org/u/mdoggydog)
#### Post date: [February 16, 2025, 2:30am UTC](https://meta.discourse.org/t/split-up-theme-javascript-into-multiple-files/119369/37 "2025-02-16T02:30:16Z")

</div>

FWIW, I found an explanation of `api-initializers/` here:

> <https://github.com/discourse/discourse/blob/05685d430f6d03a4d16c4aa3c87de5b5d725416f/app/assets/javascripts/discourse/app/app.js#L112-L118>

(And that connects it to the Ember docs, and then it starts making sense.)

It still would be nice to have a basic enumeration/explanation of the directory structure possibilities in one document. (E.g., I know `connectors/` is a thing… are there more?)

> [@pfaffman](#):
>
> Best is to use [Install the Discourse Theme CLI console app to help you build themes](https://meta.discourse.org/t/install-the-discourse-theme-cli-console-app-to-help-you-build-themes/82950) and have it create a theme Skelton for you

Also, FWIW: the Theme CLI app pulls the skeleton from:  
[https://github.com/discourse/discourse-theme-skeleton](https://github.com/discourse/discourse-theme-skeleton)  
It only mentions `api-initializers/`.

(I am, in fact, using the Theme CLI app, but started using it after I already had the beginnings of a theme component, so I had skipped the skeleton step.)

---

_[View the full topic](https://meta.discourse.org/t/split-up-theme-javascript-into-multiple-files/119369)._
