Skip to content

hjonin/codemeta-tools

Repository files navigation

GitHub Actions Workflow Status

codemeta-tools

A set of tools to support the creation of metadata files (including but not limited to codemeta.json files) for software.

Installation

Node.js (>= 18) + npm

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"
});

Browser bundle

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>

Run locally

Install dependencies:

npm install

Run tests:

npm run test 

Publish:

npm version [version]
npm publish

Contributing

Contributions are always welcome!

There is a list of issues related to this repository, some of them labeled as good first issues.

Authors

License

AGPL-3.0-or-later