dolittle-obsolete / cli

Command Line Interace for working with the Dolittle platform
MIT License
0 stars 2 forks source link

Add an interaction step for Bounded Contexts #11

Closed einari closed 5 years ago

einari commented 6 years ago

When adding a bounded context, we should ask for adding an interaction layer - such as Web. The interaction layer boilerplate chosen might have specific choices to be made, such as "Language: JavaScript / TypeScript", "Framework: Aurelia, Angular, React, Vue...", "Styles: Dolittle, Bootstrap, Material"

There are some dependencies on things though - so we need to collect as much as possible of information before we start the creation process.

For instance, the CSharp BoundedContext boilerplate will have an EntryPoint - an interaction layer on top, which sits in a different boilerplate will be applied in the same folder. Inside the C# entrypoint, for the .csprojfile - we have our postbuild step that can potentially generate proxies for JavaScript/TypeScript. This is optional and typically right now found in the boundedcontext.jsonfile inside the .dolittlefolder.

Once we have all the choices made, we put all the details into the context object and we can use for binding throughout. For instance we could then put in:

{
   "generateProxies": "true",
   "proxyPath": "../Web"
}

Depends on #10

In a multi-boilerplate scenario like this, we need to get the choices from the boilerplates we are bringing in. So the flow would be to look at the initial boilerplate one is building, then the choice of an interaction layer means that potentially a second boilerplate will be invoked and it can have choices defined in its JSON file. We bring it all together into the context before we instantiate the boilerplates.

┆Issue is synchronized with this Asana task

einari commented 6 years ago

Use something like the Inquirer for this.