-
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?
Changes from 4 commits
67cd778
fc35e4d
e314200
fcec0b3
e4eee6a
45483ff
0610604
4220669
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@comet/mail-react": minor | ||
| --- | ||
|
|
||
| The new `@comet/mail-react` package provides utilities for building HTML emails with React |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| "@comet/mail-react": minor | ||
| --- | ||
|
|
||
| Add the `css` helper function | ||
|
|
||
| Similar to the `css` function provided by styled-components or @mui/material. | ||
| It simply returns the string passed into it but provides CSS syntax highlighting and auto-formatting when using certain IDE plugins, e.g. the "styled-components" plugin in VSCode. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| lib/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import eslintConfigReact from "@comet/eslint-config/future/react.js"; | ||
johnnyomair marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /** @type {import('eslint')} */ | ||
| const config = [ | ||
| { | ||
| ignores: ["lib/**"], | ||
| }, | ||
| ...eslintConfigReact, | ||
| { | ||
| rules: { | ||
| "@comet/no-other-module-relative-import": "off", | ||
| }, | ||
| }, | ||
| ]; | ||
|
|
||
| export default config; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /** | ||
| * @filename: lint-staged.config.mjs | ||
| * @type {import('lint-staged').Configuration} | ||
| */ | ||
| export default { | ||
| "src/**/*.{ts,tsx,js,jsx,json,css,scss,md}": () => "pnpm lint:eslint", | ||
| "src/**/*.{ts,tsx}": () => "pnpm lint:tsc", | ||
| "*.{js,json,md,yml,yaml}": () => "pnpm lint:prettier", | ||
| }; |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||||
| { | ||||||||||||
| "name": "@comet/mail-react", | ||||||||||||
| "version": "8.10.0", | ||||||||||||
| "description": "Utilities for building HTML emails with React", | ||||||||||||
| "type": "commonjs", | ||||||||||||
| "main": "lib/index.js", | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added those, but without |
||||||||||||
| "scripts": { | ||||||||||||
| "build": "pnpm run clean && tsc", | ||||||||||||
| "clean": "rimraf lib", | ||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The rimraf dependency appears to be missing. |
||||||||||||
| "dev": "tsc --watch", | ||||||||||||
| "lint": "run-p lint:prettier lint:eslint lint:tsc", | ||||||||||||
| "lint:ci": "pnpm run lint", | ||||||||||||
| "lint:eslint": "eslint --max-warnings 0 src/ **/*.json --no-warn-ignored", | ||||||||||||
| "lint:prettier": "pnpm exec prettier --check './**/*.{js,json,md,yml,yaml}'", | ||||||||||||
| "lint:tsc": "tsc" | ||||||||||||
| }, | ||||||||||||
| "devDependencies": { | ||||||||||||
| "@comet/eslint-config": "workspace:*", | ||||||||||||
| "@types/jest": "^29.5.14", | ||||||||||||
|
||||||||||||
| "eslint": "^9.30.1", | ||||||||||||
| "npm-run-all2": "^8.0.0", | ||||||||||||
| "prettier": "^3.6.2", | ||||||||||||
| "typescript": "5.9.3" | ||||||||||||
| }, | ||||||||||||
| "peerDependencies": { | ||||||||||||
| "eslint": ">=9", | ||||||||||||
| "prettier": ">=3" | ||||||||||||
| }, | ||||||||||||
|
||||||||||||
| "engines": { | ||||||||||||
| "node": ">=22.0.0" | ||||||||||||
| }, | ||||||||||||
| "publishConfig": { | ||||||||||||
| "access": "public", | ||||||||||||
| "registry": "https://registry.npmjs.org" | ||||||||||||
| } | ||||||||||||
| } | ||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { css } from "./utils/css"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| /** | ||
| * Helper function to enable syntax highlighting & auto-formatting for CSS strings when using certain IDE plugins, e.g. the "styled-components" plugin in VSCode. | ||
| */ | ||
| export const css = (strings: TemplateStringsArray, ...rest: unknown[]): string => String.raw({ raw: strings }, ...rest); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "outDir": "lib", | ||
| "rootDir": "src" | ||
| }, | ||
| "exclude": ["node_modules", "lib"], | ||
| "extends": "../../tsconfig.core.json", | ||
| "include": ["./src"] | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.