A set of tools to support the creation of metadata files (including but not limited to codemeta.json
files) for software.
npm install codemeta-tools
import {validate} from "codemeta-tools";
validate({
"@context": "https://w3id.org/codemeta/3.0",
"type": "SoftwareSourceCode",
"license": "https://spdx.org/licenses/AGPL-3.0-or-later",
"name": "codemeta-tools"
});
The npm package includes bundled code in ./dist/codemeta-tools.bundle.js
which can be loaded as an ES Module.
You can also load it using jsDelivr CDN, like in the example below.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script type="module">
import {
validate
} from "https://cdn.jsdelivr.net/npm/codemeta-tools@[VERSION]/dist/codemeta-tools.bundle.js/+esm";
validate(/* {...} */)
</script>
</body>
</html>
Install dependencies:
npm install
Run tests:
npm run test
Publish:
npm version [version]
npm publish
Contributions are always welcome!
There is a list of issues related to this repository, some of them labeled as good first issues.