Reorganize theme file structure

Created on 21 August 2025, about 2 months ago

Problem/Motivation

Mercury's file structure grew haphazardly over the course of time. It should be cleaned up.

Proposed resolution

  • /css/components/ should be moved under /src/ somewhere.
  • /images/icons/ should be moved under /icons/ or maybe go away entirely.
  • /lib/ contains one file and should go under /src/ somewhere.
  • /public/ I think can be deleted?
  • /scripts/ contains one file, which should probably go wherever the stuff under /vitePlugins/ ends up.
  • /static/ may or may not be needed after we get the static Storybook build working on GitLab pages.
  • /vitePlugins/ has some things that aren't Vite plugins. /vitePlugins/twingCustoms/ was supposed to contain only filters.js and functions.js, as those are custom Twig filters and functions to be used with Twing. The stuff in here, /lib/, and /scripts/ all needs to be organized sensibly. Also, any two-word folders that survive the reorganization should be in kebab-case, not camelCase.

Remaining tasks

  • Come up with and implement better file structure
  • Modify the Vite/Storybook build, the .info.yml, the .libraries.yml, and all relative import/include paths to work correctly with the new file structure
πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Lanny Heidbreder

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024