sofn-xyz / mailing

Build, test, send emails with React
https://www.mailing.run
MIT License
3.6k stars 74 forks source link

Organize templates in directories #435

Open maxsalven opened 1 year ago

maxsalven commented 1 year ago

I have a large amount of templates and they are all in the /emails folder. I'd love to be able to organize these into subdirectories, e.g.

/emails/accounts/password_reset.tsx
/emails/marketplace/item_purchased.tsx
psugihara commented 1 year ago

I like this idea a lot and would welcome a pull request here. I think we could make this change with no UI changes to start, just need to modify where we read in the templates: https://github.com/sofn-xyz/mailing/blob/main/packages/cli/src/commands/preview/server/setup.ts#L66