Commit Graph

3 Commits

Author SHA1 Message Date
Fabien "egg" O'Carroll
104f84f252 Added eslint rule for file naming convention
As discussed with the product team we want to enforce kebab-case file names for
all files, with the exception of files which export a single class, in which
case they should be PascalCase and reflect the class which they export.

This will help find classes faster, and should push better naming for them too.

Some files and packages have been excluded from this linting, specifically when
a library or framework depends on the naming of a file for the functionality
e.g. Ember, knex-migrator, adapter-manager
2023-05-09 12:34:34 -04:00
Kevin Ansfield
cf9cee0208 First pass at custom-theme-settings-service functionality
refs https://github.com/TryGhost/Team/issues/1070

- added `bread` util that acts as a wrapper for the provided model, if we have any business functionality needed when settings are added/removed then it will go here
- added primary "server" service that handles syncing of custom theme data extracted from a theme with the settings that are in the database and exported as "Service". Syncing rules on theme activation:
    - if a new setting is seen, create it with the default value
    - if a setting has it's type changed, remove it and create a new setting with the default value
    - if a select setting's value is not a valid option, reset it to the default value
- added shared "frontend/server" service that exposes an in-memory cache of key/value pairs for the currently active theme
2021-09-22 21:56:45 +01:00
Kevin Ansfield
56012f5f21 slimer new custom-theme-settings-service 2021-09-21 17:21:52 +01:00