Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit e7c2cd9

Browse files
authored
🩹 Fix Seed usage with Upload Plugin (#11)
1 parent 59d342e commit e7c2cd9

13 files changed

+13
-5
lines changed

cms/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ $RECYCLE.BIN/
8080
ssl
8181
.idea
8282
nbproject
83-
83+
public/uploads/*
84+
!public/uploads/.gitkeep
8485

8586
############################
8687
# Node.js

cms/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ By default, on the first application _DEVELOPMENT_ start(with `yarn develop`), *
2222
yarn seed
2323
```
2424

25-
> ⚠️ This will clear all data from all available collections
25+
> ⚠️ This will **clear all data** from all available collections
26+
27+
> ⚠️ If something happens during seeding and data starts to grow rapidly - **clear User collection** manually
2628
2729
#### How it works?
2830

cms/config/plugins.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
module.exports = ({ env }) => ({
2-
// ...
1+
const { isDevelopment } = require('../src/helpers');
2+
3+
const getDevPlugins = (env) => ({})
4+
const getProductionPlugins = (env) => ({
35
upload: {
46
config: {
57
provider: "aws-s3",
@@ -13,5 +15,8 @@ module.exports = ({ env }) => ({
1315
},
1416
},
1517
},
16-
// ...
18+
})
19+
20+
module.exports = ({ env }) => ({
21+
...(isDevelopment() ? getDevPlugins(env) : getProductionPlugins(env))
1722
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)