Skip to content

Commit bb17cc3

Browse files
authored
refactor: remove unused assets, move remaining assets out of payload packages (#12874)
This PR removes the `packages/payload/src/assets` folder for the following reasons: - they were published to npm. Removing this decreases the install size of payload (excluding dependencies) from 6.22MB => 5.12MB - most assets were unused. The only used ones were moved to a different directory that does not get published to npm This also updates some outdated asset URLs in our examples
1 parent 1b5e3fe commit bb17cc3

File tree

15 files changed

+10
-42
lines changed

15 files changed

+10
-42
lines changed

.github/reproduction-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ There are a couple ways run integration tests:
4040

4141
- **Granularly** - you can run individual tests in vscode by installing the Jest Runner plugin and using that to run individual tests. Clicking the `debug` button will run the test in debug mode allowing you to set break points.
4242

43-
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/payload/src/assets/images/github/int-debug.png" />
43+
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/.github/assets/int-debug.png" />
4444

4545
- **Manually** - you can run all int tests in the `/test/_community/int.spec.ts` file by running the following command:
4646

@@ -57,7 +57,7 @@ The easiest way to run E2E tests is to install
5757

5858
Once they are installed you can open the `testing` tab in vscode sidebar and drill down to the test you want to run, i.e. `/test/_community/e2e.spec.ts`
5959

60-
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/payload/src/assets/images/github/e2e-debug.png" />
60+
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/.github/assets/e2e-debug.png" />
6161

6262
#### Notes
6363

ISSUE_GUIDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ There are a couple ways to do this:
4545

4646
- **Granularly** - you can run individual tests in vscode by installing the Jest Runner plugin and using that to run individual tests. Clicking the `debug` button will run the test in debug mode allowing you to set break points.
4747

48-
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/payload/src/assets/images/github/int-debug.png" />
48+
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/.github/assets/int-debug.png" />
4949

5050
- **Manually** - you can run all int tests in the `/test/_community/int.spec.ts` file by running the following command:
5151

@@ -62,7 +62,7 @@ The easiest way to run E2E tests is to install
6262

6363
Once they are installed you can open the `testing` tab in vscode sidebar and drill down to the test you want to run, i.e. `/test/_community/e2e.spec.ts`
6464

65-
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/payload/src/assets/images/github/e2e-debug.png" />
65+
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/.github/assets/e2e-debug.png" />
6666

6767
#### Notes
6868

examples/auth/src/app/(app)/_components/Header/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ export const Header = () => {
1414
<picture>
1515
<source
1616
media="(prefers-color-scheme: dark)"
17-
srcSet="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/payload-logo-light.svg"
17+
srcSet="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-light.svg"
1818
/>
1919
<Image
2020
alt="Payload Logo"
2121
height={30}
22-
src="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/payload-logo-dark.svg"
22+
src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-dark.svg"
2323
width={150}
2424
/>
2525
</picture>

examples/live-preview/src/app/(app)/_components/Header/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export const Header = async () => {
2727
<picture>
2828
<source
2929
media="(prefers-color-scheme: dark)"
30-
srcSet="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/payload-logo-light.svg"
30+
srcSet="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-light.svg"
3131
/>
3232
<Image
3333
alt="Payload Logo"
3434
height={30}
35-
src="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/payload-logo-dark.svg"
35+
src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-dark.svg"
3636
width={150}
3737
/>
3838
</picture>

examples/localization/src/components/Logo/Logo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const Logo = () => {
66
<img
77
alt="Payload Logo"
88
className="max-w-[9.375rem] invert dark:invert-0"
9-
src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/payload/src/admin/assets/images/payload-logo-light.svg"
9+
src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-light.svg"
1010
/>
1111
)
1212
}

examples/localization/src/globals/Footer/Component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function Footer({ locale }: { locale: TypedLocale }) {
2121
<img
2222
alt="Payload Logo"
2323
className="max-w-[6rem] invert-0"
24-
src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/payload/src/admin/assets/images/payload-logo-light.svg"
24+
src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/ui/src/assets/payload-logo-light.svg"
2525
/>
2626
</picture>
2727
</Link>

packages/payload/src/assets/assets.d.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)