Collection of npm packages supporting supermodel.io
TODO
@supermodel/cli README
Main package used for installing system wide binary supermodel
for manipulating schemas
@supermodel/lib README
Collection of utils on top of json schema. Used in @supermodel/cli and on supermodel.io
@supermodel/file README
Utils for manipulating json schema on file system. Used in @supermodel/cli
We are using lerna for managing all packages together
-
yarn global add [email protected]
(npm i -g [email protected]
) - to install orchstrating tool lerna -
yarn bootstrap
- resolves and install root and packages dependencies⚠️ use this instead ofyarn [install]
- ensures presence of global installation of lerna and install it for you when missing
-
🤔 optional When developing against local supermodel.io instance setup .env for CLI. Choose symlink or copy:
- symlink:
ln -s ./packages/cli/.env.development ./packages/cli/.env
- copy:
cp ./packages/cli/.env.development ./packages/cli/.env
and change variables for your needs
- symlink:
yarn build:watch
- should be running while you want to use
./packages/cli/bin/supermodel
orsupermodel
afteryarn local:install
- should be running while you want to use
yarn test:watch
- watch tests in all packages at onceyarn build
- make production buildsyarn test
- run lint, type checks and run tests in all packages at onceyarn test:lint
- code lintingyarn test:types
- type checksyarn test:unit
- unit tests
To try @supermodel/cli locally with simple supermodel
command we need to link all packages.
There is shortcut to link all packages
yarn local:install
yarn local:uninstall
Every new module which manipulates with schemas (conversion, resolving, transforming etc.) or helps to work with schemas and environment around should be placed inside @supermodel/lib. Exposed modules for outside usage should return a value, or throw an error. Or promise analogy (resolve, reject) for async modules.
TODO
lerna publish
- useses lerna publish
- It is most streightforward way to publish. It compile typescript with
yarn build
command, tag changed packages with new versions and publish it to npm
supermodel.io, and supermodel CLI are Good API non-profit projects, aimed at promoting modern, reusable, and sustainable data modeling.
The MIT License (MIT) 2019 Good API