Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 2.28 KB

README_dev.md

File metadata and controls

37 lines (25 loc) · 2.28 KB

Development Guide

Prerequisites

Getting Started

Run melos bootstrap to install and link dependencies in all packages and apps.

Melos scripts

For an overview of all available melos scripts, run melos run or melos run --help.

Update the Runtime

Basically, the whole enmeshed Runtime is written in the file packages/enmeshed_runtime_bridge/assets/index.js. Its respective version is specified in packages/enmeshed_runtime_bridge/natives/package.json. In order to update it, you must adjust the version there, navigate to packages/enmeshed_runtime_bridge/natives and run npm i. Afterwards, run npm run build in the same location, which will update the index.js file.

Now, to make the changes accessible for the App, all adjustments that are exposed, e.g. DTOs, DVOs, use cases and events, need to be adjusted in their respective places. To do so, step through every Runtime change that was performed from the previous version to your newly updated one and check if it needs to be transferred to the App. Usually, only changes to the Content- and Runtime-library are relevant for the App, but if you aren't sure, simply use the search function and check if the respective data object occurs anywhere besides the index.js file in the App-repository. Don't forget to test every function you add to a facade.

Sometimes, a part of adding a new or adjusting an existing data object can be automated. An example is adding a property to a DVO. For this to work, @JsonSerializable(includeIfNull: false) must be written above the class declaration. Then, run dart run build_runner build from the respective package. This will create a file with the same name, but .g.dart as ending. It is advisable to format the files of the package thereafter, e.g. by running dart format . --set-exit-if-changed -l 150.