create-payload-app 0.3.24 → 0.3.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ import path from 'path';
2
+ import type { CollectionConfig } from 'payload/types';
3
+
4
+ const Media: CollectionConfig = {
5
+ slug: 'media',
6
+ upload: {
7
+ staticDir: path.resolve(__dirname, '../../media'),
8
+ // Specify the size name that you'd like to use as admin thumbnail
9
+ adminThumbnail: 'thumbnail',
10
+ imageSizes: [
11
+ {
12
+ height: 400,
13
+ width: 400,
14
+ crop: 'center',
15
+ name: 'thumbnail',
16
+ },
17
+ {
18
+ width: 900,
19
+ height: 450,
20
+ crop: 'center',
21
+ name: 'sixteenByNineMedium',
22
+ },
23
+ ],
24
+ },
25
+ fields: [],
26
+ };
27
+
28
+ export default Media;
@@ -4,6 +4,7 @@ import Categories from './collections/Categories';
4
4
  import Posts from './collections/Posts';
5
5
  import Tags from './collections/Tags';
6
6
  import Users from './collections/Users';
7
+ import Media from './collections/Media';
7
8
 
8
9
  export default buildConfig({
9
10
  serverURL: 'http://localhost:3000',
@@ -15,6 +16,7 @@ export default buildConfig({
15
16
  Posts,
16
17
  Tags,
17
18
  Users,
19
+ Media,
18
20
  ],
19
21
  typescript: {
20
22
  outputFile: path.resolve(__dirname, 'payload-types.ts')
package/package.json CHANGED
@@ -37,7 +37,7 @@
37
37
  "prompts": "^2.4.0",
38
38
  "terminal-link": "^2.1.1"
39
39
  },
40
- "version": "0.3.24",
40
+ "version": "0.3.25",
41
41
  "devDependencies": {
42
42
  "@types/command-exists": "^1.2.0",
43
43
  "@types/degit": "^2.8.3",