Folder structure for an Astro integration

We’re working on an Elm integration for Astro, and things are looking pretty great so far! We’re planning to release it in a few days (if everything goes as planned).

We found 2 ways to structure the Elm code:

  1. The elm.json file is placed at the root of the project (with source-directories set to src/components) and your Elm files residing in the components folder.

  2. Have an elm folder on the same level as the components folder, containing all your Elm-related files including elm.json, src, tests, etc.

Option 1 is more Astro-like, while option 2 is more Elm-like. Which one would you prefer?

6 Likes

Personally I’d prefer an elm.json file at the root, with the option to define my own source-directories. But shouldn’t the users be able to control where the elm.json lives?

Looking forward to seeing the integration!

1 Like

@klaftertief Thank you for valuable input!

I’ve also asked around on the Elm Slack and it seems like people’s opinions are converging.

We’re proceeding with the elm.json placed in the root directory, and will follow up with an option to configure it in the next minor release.

There will also be a helpful error message if the elm.json can’t be found.

2 Likes

Little late, but this would also be my preference. :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.