nilbuild/makers.ae
Add command to validate if all the members have valid data
Offen
#5 geöffnet am 02.11.2020
good first issue
Repository-Metriken
- Stars
- (39 Sterne)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
We need to write a command which will be used during the build time to validate if all the members have valid data.
The command should go through the members directory, run the following validations:
- All the directories have two files inside
profile.jsonandbio.md profile.jsonhas valid JSON- Directory name matches the
usernameinsideprofile.json - The
imageUrlgiven inprofile.jsonexists in the image directory. - All the required fields exist in the
profile.jsoni.e.username,title,designation,company,imageUrlandjoinDate
If any of the validation checks above fail, prepare the list of errors and exit with error.
I have already added the placeholder code for running the commands, we just have to write the logic inside the command.
yarn cmd members.validate