TypeScript library for loading metadata profiles and vocabularies.
npm install @iqb/metadata-resolverimport { 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);See GETTING_STARTED.md for detailed usage guide.
0.1.0 - Testing phase
npm installWe 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 formatnpm run buildTo 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 --tags -
Publish:
npm run release
The
prepublishOnlyscript will automatically run tests, linting, and build before publishing ensures only valid code is released.
- 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
MIT © IQB Berlin