@iqb/metadata-resolver
v0.1.1
Published
Framework-agnostic metadata and vocabulary resolver for IQB metadata profiles
Readme
@iqb/metadata-resolver
TypeScript library for loading metadata profiles and vocabularies.
Installation
npm install @iqb/metadata-resolverQuick Start
import { MetadataResolver } from '@iqb/metadata-resolver';
const resolver = new MetadataResolver();
const data = await resolver.loadProfileWithVocabularies(
'https://raw.githubusercontent.com/iqb-vocabs/p16/master/unit.json'
);
console.log(data.profile);
console.log(data.vocabularies);Documentation
See GETTING_STARTED.md for detailed usage guide.
Version
0.1.0 - Testing phase
Development
Setup
npm installQuality Checks
We use ESLint and Prettier to ensure code quality.
# Run linting
npm run lint
# Run type check
npm run typecheck
# Run tests
npm run test
# Format code
npm run formatBuild
npm run buildRelease
To publish a new version to NPM:
Update Version:
npm version patch # or minor, majorThis updates
package.jsonand creates a git tag.Push Changes:
git push && git push --tagsPublish:
npm run releaseThe
prepublishOnlyscript will automatically run tests, linting, and build before publishing ensures only valid code is released.
Configuration
- Registry: Configured in
.npmrc(default is npmjs.org). - Access: defaults to
publicinpackage.json. - Tags: pass flags to the release script:
npm run release -- --tag beta
License
MIT © IQB Berlin
