Commit Graph

5 Commits

Author SHA1 Message Date
Daniel Lockyer
09c59a6569 Lazyloaded several required dependencies
- these dependencies can be pushed to be loaded later than upon boot,
  where boot time is critical
- this commit makes boot about 4% faster
2024-07-26 09:52:26 +02:00
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
Naz
32e42ae276 Added more precise JSDoc to email content generator
refs https://github.com/TryGhost/Toolbox/issues/292

- Provided better type checking/suggestions
2022-05-05 12:17:30 +08:00
Naz
ca693f79f8 Reworked EmailContentGenerator to async/await
refs https://github.com/TryGhost/Toolbox/issues/292

- Makes the code more readable
2022-05-04 17:16:43 +08:00
Naz
0c2cc2af8a Refactored email utils to a class with DI params
refs https://github.com/TryGhost/Toolbox/issues/292

- There's a need to reuse these utils in the version mismatch notification service. Having loads of tightly coupled dependencies makes it super hard to rip out this module for reuse
- It's a groundwork for extraction of the email-utils package
- Rewrote the unit tests that were written for these utils previously - they weren't testing anything useful. The goal of this util is to generate specific content based on provided data and available templates - now the tests do test those specific things, not the mailer itself!
2022-05-04 17:16:43 +08:00