diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/index.js b/index.js index 3675d2d..89d611d 100644 --- a/index.js +++ b/index.js @@ -1,15 +1,7 @@ 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; +module.exports = { + "contribution": JSON.parse(fs.readFileSync(path.join(__dirname, 'schemas', 'contribution.json'))), + "contributor": JSON.parse(fs.readFileSync(path.join(__dirname, 'schemas', 'contributor.json'))) +}; diff --git a/package.json b/package.json index c682523..445bbee 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,18 @@ "remotestorage" ], "author": "Kosmos Contributors ", - "contributors": [ - ], + "contributors": [], "license": "MIT", "repository": { "type": "git", "url": "https://github.com/67P/kosmos-schemas.git" + }, + "devDependencies": { + "brfs-babel": "^1.0.0" + }, + "browserify": { + "transform": [ + "brfs-babel" + ] } }