Development
These are some of the development guidelines and help to setup the library for development.
Docker
A Dockerfile is provided and can be used for running test suites or any other command. You can either build the image and run the needed commands manually or rather use any of the following npm scripts:
npm run docker:build
builds the docker image with the tagasyncapi/modelina
(the rest of the scripts run this one as well).npm run docker:test
runs the main test suite.
Environment setup
To setup the environment follow these steps:
- Make sure to use the appropriate node version as listed in the package.json file. If you use
nvm
, you can simply donvm use
- Setup the project by first installing the dependencies
npm install
- Make sure the tests pass by running
npm run test
script- You can update snapshots by running
npm run test -- -u
- You can update snapshots by running
- Make sure code is well formatted and secure with eslint by running
npm run lint
, you can also auto format your code withnpm run format