diff --git a/index.js b/index.js new file mode 100644 index 0000000..3675d2d --- /dev/null +++ b/index.js @@ -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;