Export schemas as module
This commit is contained in:
parent
50c46b4b41
commit
9e8b070489
15
index.js
Normal file
15
index.js
Normal file
@ -0,0 +1,15 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
let collection = {};
|
||||
let schemas = [
|
||||
"contributor",
|
||||
"contribution"
|
||||
];
|
||||
|
||||
schemas.forEach((schema) => {
|
||||
let filePath = path.join(__dirname, 'schemas', `${schema}.json`);
|
||||
collection[schema] = JSON.parse(fs.readFileSync(filePath));
|
||||
});
|
||||
|
||||
module.exports = collection;
|
Loading…
x
Reference in New Issue
Block a user