-
Notifications
You must be signed in to change notification settings - Fork 9
Setup @comet/mail-react package
#4951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
bade9e2 to
576a772
Compare
This will be used for helper functions for building HTML emails with React, such as the already included `css` helper. Simple components built with React and/or MJML may also be added in future PRs.
576a772 to
67cd778
Compare
|
What's the difference between this package and the mail-rendering package? |
|
Depending on what you intend to put into this package (is it only utils?) we should decide if we want to reserve the Alternative names:
|
Found an internal discussion: the mail-rendering package has peer dependencies on |
It probably doesn't make sense to have both packages. We discussed this a while ago internally, I sent you the thread 🙂 Another reason was that we don't want/need the dependency on |
Utils for now, likely react and/or react-mjml components in the future. You're right,
@thomasdax98 what do you think? |
The |
Agree'd. We should merge the |
That would probably make sense. The image-logic seems to have been copied into Maybe the name of the package should then be Maybe even an additional |
I'm not sure about this, since site and mail could evolve into very different directions. Maybe a little copying is okay.
Yes, good idea!
Agree'd. |
| "main": "lib/index.js", | ||
| "scripts": { | ||
| "build": "pnpm run clean && tsc", | ||
| "clean": "rimraf lib", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rimraf dependency appears to be missing.
| "version": "8.10.0", | ||
| "description": "Utilities for building HTML emails with React", | ||
| "type": "commonjs", | ||
| "main": "lib/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package.json should include a types and files field as well, see:
comet/packages/api/cms-api/package.json
Lines 13 to 17 in 47944a7
| "types": "lib/index.d.ts", | |
| "files": [ | |
| "bin/**/*.js", | |
| "lib/*" | |
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added those, but without bin/**/*.js, as there is no bin directory created during build.
Is that correct? (I have no idea what this is used for 😅)
packages/mail-react/package.json
Outdated
| "peerDependencies": { | ||
| "eslint": ">=9", | ||
| "prettier": ">=3" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This aren't peer dependencies. Which package did you choose as basis?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, should have noticed that, they are included in devDependencies anyway 😅
Which package did you choose as basis?
Mostly from site-react but partially from eslint-config because I thought that would be the smallest/simplest.
packages/mail-react/package.json
Outdated
| }, | ||
| "devDependencies": { | ||
| "@comet/eslint-config": "workspace:*", | ||
| "@types/jest": "^29.5.14", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this package.
Description
This will be used for helper functions for building HTML emails with React, such as the already included
csshelper.Simple components built with React and/or MJML may also be added in future PRs.
Acceptance criteria
Open TODOs/questions
Further information