5 Commits

Author SHA1 Message Date
2990b32029 Remove obsolete browserify transform dependency 2022-04-27 15:42:13 +02:00
0566ba2f7f 3.0.0 2020-06-28 00:42:38 +02:00
a2dc2e15f2 Merge pull request #15 from 67P/feature/browser-compat
Use CommonJS exports/imports for schema files
2020-06-28 00:41:17 +02:00
67cc3d9d74 Use CommonJS for schema files
Instead of relying on `fs` and `path`, which are node-specific modules.
2020-06-27 16:19:03 +02:00
bc039bbe5c 2.2.1 2020-05-16 13:18:56 +02:00
6 changed files with 24 additions and 16 deletions

View File

@@ -1,7 +1,9 @@
const fs = require('fs');
const path = require('path');
const contribution = require('./schemas/contribution');
const contributor = require('./schemas/contributor');
const expense = require('./schemas/expense');
module.exports = {
"contribution": JSON.parse(fs.readFileSync(path.join(__dirname, 'schemas', 'contribution.json'))),
"contributor": JSON.parse(fs.readFileSync(path.join(__dirname, 'schemas', 'contributor.json')))
contribution,
contributor,
expense
};

13
package-lock.json generated Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "@kosmos/schemas",
"version": "3.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@kosmos/schemas",
"version": "3.0.0",
"license": "MIT"
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@kosmos/schemas",
"version": "2.2.0",
"version": "3.0.0",
"description": "JSON-LD schemas for Kosmos data formats",
"main": "index.js",
"scripts": {
@@ -9,6 +9,7 @@
"keywords": [
"ipfs",
"kosmos",
"kredits",
"remotestorage"
],
"author": "Kosmos Contributors",
@@ -16,13 +17,5 @@
"repository": {
"type": "git",
"url": "https://github.com/67P/kosmos-schemas.git"
},
"dependencies": {
"brfs-babel": "^1.0.0"
},
"browserify": {
"transform": [
"brfs-babel"
]
}
}

View File

@@ -1,4 +1,4 @@
{
module.exports = {
"$schema": "https://json-schema.org/draft-07/schema#",
"id": "https://schema.kosmos.org/Contribution",
"properties": {

View File

@@ -1,4 +1,4 @@
{
module.exports = {
"$schema": "https://json-schema.org/draft-07/schema#",
"id": "https://schema.kosmos.org/Contributor",
"properties": {

View File

@@ -1,4 +1,4 @@
{
module.exports = {
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://schema.kosmos.org/Expense",
"type": "object",