-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(examples): migrates
email
example to 3.0 [skip-lint] (#9215)
Changes: - Migrates `email` example project to `3.0` from `2.0` - Replaces `inline-css` dependency with `juice` package instead. - Replaces `Handlebars` dependency with `ejs` package instead. Reason for replacing packages: - Both `inline-css` & `Handlebars` had issues with Nextjs and its Webpack bundling i.e does not support `require.extensions`. - `ejs` & `juice` do not rely on `require.extensions`.
- Loading branch information
1 parent
7c732be
commit ba06ce6
Showing
32 changed files
with
7,808 additions
and
8,507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
MONGODB_URI=mongodb://127.0.0.1/payload-example-email | ||
PAYLOAD_SECRET= | ||
DATABASE_URI=mongodb://127.0.0.1/payload-example-email | ||
NODE_ENV=development | ||
PAYLOAD_PUBLIC_SERVER_URL=http://localhost:8000 | ||
PAYLOAD_SECRET=PAYLOAD_EMAIL_EXAMPLE_SECRET_KEY | ||
PAYLOAD_PUBLIC_SERVER_URL=http://localhost:3000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['@payloadcms'], | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/swcrc", | ||
"sourceMaps": true, | ||
"jsc": { | ||
"target": "esnext", | ||
"parser": { | ||
"syntax": "typescript", | ||
"tsx": true, | ||
"dts": true | ||
}, | ||
"transform": { | ||
"react": { | ||
"runtime": "automatic", | ||
"pragmaFrag": "React.Fragment", | ||
"throwIfNamespace": true, | ||
"development": false, | ||
"useBuiltins": true | ||
} | ||
} | ||
}, | ||
"module": { | ||
"type": "es6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { withPayload } from '@payloadcms/next/withPayload' | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
// Your Next.js config here | ||
} | ||
|
||
export default withPayload(nextConfig) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,57 @@ | ||
{ | ||
"name": "payload-example-email", | ||
"description": "Payload Email integration example.", | ||
"version": "1.0.0", | ||
"main": "dist/server.js", | ||
"description": "Payload Email integration example.", | ||
"license": "MIT", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "cross-env PAYLOAD_SEED=true PAYLOAD_DROP_DATABASE=true PAYLOAD_CONFIG_PATH=src/payload.config.ts nodemon", | ||
"build:payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload build", | ||
"build:server": "tsc", | ||
"build": "yarn copyfiles && yarn build:payload && yarn build:server", | ||
"serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js", | ||
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/", | ||
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types", | ||
"generate:graphQLSchema": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema", | ||
"lint": "eslint src", | ||
"lint:fix": "eslint --fix --ext .ts,.tsx src" | ||
"_dev": "cross-env NODE_OPTIONS=--no-deprecation next dev", | ||
"build": "cross-env NODE_OPTIONS=--no-deprecation next build", | ||
"dev": "cross-env PAYLOAD_SEED=true PAYLOAD_DROP_DATABASE=true NODE_OPTIONS=--no-deprecation next dev", | ||
"generate:importmap": "cross-env NODE_OPTIONS=--no-deprecation payload generate:importmap", | ||
"generate:schema": "payload-graphql generate:schema", | ||
"generate:types": "payload generate:types", | ||
"payload": "cross-env NODE_OPTIONS=--no-deprecation payload", | ||
"start": "cross-env NODE_OPTIONS=--no-deprecation next start" | ||
}, | ||
"dependencies": { | ||
"@payloadcms/db-mongodb": "beta", | ||
"@payloadcms/email-nodemailer": "beta", | ||
"@payloadcms/next": "beta", | ||
"@payloadcms/richtext-lexical": "beta", | ||
"@payloadcms/ui": "beta", | ||
"cross-env": "^7.0.3", | ||
"dotenv": "^8.2.0", | ||
"express": "^4.17.1", | ||
"payload": "latest", | ||
"handlebars": "^4.7.7", | ||
"inline-css": "^4.0.2" | ||
"ejs": "3.1.10", | ||
"graphql": "^16.9.0", | ||
"juice": "11.0.0", | ||
"next": "15.0.0", | ||
"payload": "beta", | ||
"react": "19.0.0-rc-65a56d0e-20241020", | ||
"react-dom": "19.0.0-rc-65a56d0e-20241020" | ||
}, | ||
"devDependencies": { | ||
"@types/express": "^4.17.9", | ||
"copyfiles": "^2.4.1", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^8.19.0", | ||
"nodemon": "^2.0.6", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.8.4" | ||
"@payloadcms/graphql": "beta", | ||
"@swc/core": "^1.6.13", | ||
"@types/ejs": "^3.1.5", | ||
"@types/react": "npm:types-react@19.0.0-rc.1", | ||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", | ||
"eslint": "^8.57.0", | ||
"eslint-config-next": "15.0.0", | ||
"tsx": "^4.16.2", | ||
"typescript": "5.5.2" | ||
}, | ||
"engines": { | ||
"node": "^18.20.2 || >=20.9.0" | ||
}, | ||
"pnpm": { | ||
"overrides": { | ||
"@types/react": "npm:types-react@19.0.0-rc.1", | ||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1" | ||
} | ||
}, | ||
"overrides": { | ||
"@types/react": "npm:types-react@19.0.0-rc.1", | ||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1" | ||
} | ||
} |
Oops, something went wrong.