# Dev Pack Setup Questions

**URL:** <https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808>\
**Category:** Elements\
**Created:** [January 3, 2025, 12:16am UTC](https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808 "2025-01-03T00:16:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bill/32/107_2.png) [@Bill](https://forums.realmacsoftware.com/u/Bill)\
**Post date:** [January 3, 2025, 12:16am UTC](https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808/1 "2025-01-03T00:16:31Z")

</div>

@tpbradley @dan  
Ok guys, trying to understand devpack again, but it’s pretty confusing to me.

When I created a devpack following the video:

- Whether there is only a single component or a bunch of components, do they always get placed inside of the ‘components’ folder?

- I see two info.json files in my devpack. We need clear explanation of what the root one should contain vs the one within the component.

- Should version and build both be a single integer number, like 1 in both?, as Tom didn’t give me a concrete example and of course docs are probably wrong.

- If we are going to have you guys host the products is info.json ‘missing URL’ even needed? As I guess you guys will handle helping client w/ reinstalling, etc.

- Is framework info.json, when an element uses a particular framework like Foundation, or is it meant to indicate something else? I didn’t understand this at all ‘You can use this key to group Elements from the same Framework togther.’  
Or maybe it’s to group a bunch of elements together in left panel, not sure.

- What assets in info.json should be declared ?

- Since I didn’t see an explanation, are things placed in assets folder supposed to be non-variable files? And files placed in templates folder are supposed to contain {{variables}}?

- Do we put the hooks file in shared hooks folder as hooks.js and if there are more than one element, how does Elements know which file goes with which element?

- Not sure if there is only one element in the pack, if we need to set up a hooks, assets, templates folders inside of the component?

- Will shared templates folder support all the types specified in portal?

- I think it would be a good idea that when a devpack is created it builds ALL folders and sets up dummy files, so we don’t have to spend hrs trying to figure out where everything needs to be put. (Stretch goal - take all files in a specified component during devpack creation and put them where they need to go)

---

<div class="post-metadata">

**Author:** ![tpbradley](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/tpbradley/32/25503_2.png) [@tpbradley](https://forums.realmacsoftware.com/u/tpbradley)\
**Post date:** [January 3, 2025, 3:30pm UTC](https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808/2 "2025-01-03T15:30:08Z")

</div>

@Bill Thanks for reporting all this. For brevity, I’ve updated the manual where necessary and included the relevant links below.

We also have a growing list of example element packs you can refer to [here](https://github.com/realmacsoftware/RWElementDevPacks/tree/main).

> [@Bill](#):
>
> Whether there is only a single component or a bunch of components, do they always get placed inside of the ‘components’ folder?

Yes, a pack can contain multiple things, components, themes (and more in the future). Any components should be placed in the components folder.

Note: You could have a pack that doesn’t contain any components, instead it could contain themes and other items.

> [@Bill](#):
>
> I see two info.json files in my devpack. We need clear explanation of what the root one should contain vs the one within the component.

See the manual  
[Element Pack info.json](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/info.json)  
[Component info.json](https://docs.realmacsoftware.com/elements-docs/elements-language/components/info.json)

> [@Bill](#):
>
> Should version and build both be a single integer number, like 1 in both?, as Tom didn’t give me a concrete example and of course docs are probably wrong.

Yes, both are integer values. [See docs](https://app.gitbook.com/o/qIywZyO82bvjWx2b4aH7/s/Ny6AECEVH2p4eFDicpM1/elements-language/bundle-structure/info.json)

> [@Bill](#):
>
> If we are going to have you guys host the products is info.json ‘missing URL’ even needed? As I guess you guys will handle helping client w/ reinstalling, etc.

No, missing url isn’t needed. Removed from docs.

> [@Bill](#):
>
> framework info.json

framework key is no longer supported. Removed from docs

> [@Bill](#):
>
> What assets in info.json should be declared ?

No assets need to be declared. Removed from docs

> [@Bill](#):
>
> Since I didn’t see an explanation, are things placed in assets folder supposed to be non-variable files? And files placed in templates folder are supposed to contain {{variables}}?

Yes, assets are copied, templates are processed. Updated docs [here](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/components/assets) and [here](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/components/templates)

> [@Bill](#):
>
> Do we put the hooks file in shared hooks folder as hooks.js and if there are more than one element, how does Elements know which file goes with which element?

See docs on [shared hooks](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/shared-files/hooks) and [component hooks](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/components/hooks.js)

> [@Bill](#):
>
> Not sure if there is only one element in the pack, if we need to set up a hooks, assets, templates folders inside of the component?

Are you referring to the shared directory? You only really need to use this if multiple components share the same assets or hooks.

For a single component you could add hooks/assets/templates within the component itself.

> [@Bill](#):
>
> Will shared templates folder support all the types specified in portal?

Yes. Shared templates for pageStart/pageEnd is on the list.

> [@Bill](#):
>
> I think it would be a good idea that when a devpack is created it builds ALL folders and sets up dummy files, so we don’t have to spend hrs trying to figure out where everything needs to be put. (Stretch goal - take all files in a specified component during devpack creation and put them where they need to go)

We’d prefer to avoid this, as it could lead to unused template files being deployed when a pack is published. Our goal is to enhance Elements by adding more controls for generating files as needed — for example, an option to **“Add hooks file”** when it’s required.

We could also look at adding an option to copy a custom component to an element pack.

---

<div class="post-metadata">

**Author:** ![Bill](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bill/32/107_2.png) [@Bill](https://forums.realmacsoftware.com/u/Bill)\
**Post date:** [January 3, 2025, 7:40pm UTC](https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808/3 "2025-01-03T19:40:07Z")

</div>

Ok, great, it’s starting to make more sense. Some quick followups:

- In docs, need to remove assets from key/value list in Components \> Assets

- Inside of the assets folder, in the example, there is a page folder. Can you explain what ‘page’ is meant to be used for and any other types that you are planning.

- For component templates folder, is the intent for us to set up as Ex: a bodyEnd folder (js), headEnd folder (css) and index.html file?

- For a single component in a devpack, can the id for the component and the devpack be the same thing?

---

<div class="post-metadata">

**Author:** ![tpbradley](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/tpbradley/32/25503_2.png) [@tpbradley](https://forums.realmacsoftware.com/u/tpbradley)\
**Post date:** [January 3, 2025, 11:43pm UTC](https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808/4 "2025-01-03T23:43:16Z")

</div>

> [@Bill](#):
>
> In docs, need to remove assets from key/value list in Components \> Assets

Thanks, done!

> [@Bill](#):
>
> Inside of the assets folder, in the example, there is a page folder. Can you explain what ‘page’ is meant to be used for and any other types that you are planning.

Assets stored in the page folder will be deployed to page files during publish. Updated docs [here](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/components/assets)

We may add support for deployment of assets at the site level, but it’s currently unsupported. To achieve this, use [shared assets](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/shared-files/assets).

> [@Bill](#):
>
> For component templates folder, is the intent for us to set up as Ex: a bodyEnd folder (js), headEnd folder (css) and index.html file?

Yes, updated docs [here](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/components/templates)

> [@Bill](#):
>
> For a single component in a devpack, can the id for the component and the devpack be the same thing?

Yes you can, but I’d advise against it. It’s good practice to keep naming consistent, like this.

```auto
Pack: `com.domain.weatherpack`
Component: `com.domain.weatherpack.stormalert`

```

This would ensure you can easily add more components in the future, should you need to.

---

<div class="post-metadata">

**Author:** ![Bill](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bill/32/107_2.png) [@Bill](https://forums.realmacsoftware.com/u/Bill)\
**Post date:** [January 4, 2025, 1:04am UTC](https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808/5 "2025-01-04T01:04:35Z")

</div>

Great.

- What about the shared templates folder - what folders are allowed in there? And I’m guessing we wouldn’t put loose files in the root of templates, but let me know.

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [January 4, 2025, 7:14pm UTC](https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808/6 "2025-01-04T19:14:07Z")

</div>

You can set up the “shared” folder with the following structure:

- shared  
– assets  
– hooks  
– templates  
— bodyStart  
— bodyEnd  
— headEnd  
— headStart

**Edit:** Just remembered, this is [already in the Docs here](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/shared-files), [and here](https://docs.realmacsoftware.com/elements-docs/elements-language/bundle-structure/shared-files/templates). Let me know if you need further clarification.

---

<div class="post-metadata">

**Author:** ![Bill](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/bill/32/107_2.png) [@Bill](https://forums.realmacsoftware.com/u/Bill)\
**Post date:** [January 4, 2025, 8:03pm UTC](https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808/7 "2025-01-04T20:03:02Z")

</div>

For the shared templates files, the docs say only html, but I can envision the use of css, js and php template files as well.

---

<div class="post-metadata">

**Author:** ![logrunner](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@logrunner](https://forums.realmacsoftware.com/u/logrunner)\
**Post date:** [January 5, 2025, 11:47am UTC](https://forums.realmacsoftware.com/t/dev-pack-setup-questions/45808/8 "2025-01-05T11:47:14Z")

</div>

See this post: [DevPack Template FileType - Allow PHP - #2 by dan](https://forums.realmacsoftware.com/t/devpack-template-filetype-allow-php/45688/2) 🙂
