Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

ServiceGen parameters as JSON with ModelRoot, FetchPath and SplitIntoApps. #5

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

JabX
Copy link
Collaborator

@JabX JabX commented Aug 21, 2018

Parameters are now in a JSON file similar to the model generator.

Some changes:

  • OutputDirectory should now refer to "app" folder in the SPA ("services" will be appended as necessary)
  • FetchPath can be used to override the path to the "fetch" import (defaults to "services/server", to keep the existing behaviour as default)
  • ModelRoot can be used to override the path to the model folder (defaults to "model", for the same reason). Note: both paths are relative to OutputDirectory.
  • SplitIntoApps is a new toggle to generate the services from different frontends into different top folders, which then contains their "services" folder. If off (the default), it will generate controllers in services/{frontEnd}/{folders}, if on it will be {frontEnd}/services/{folders}.

This works for me as is, but I think you'd at least want an option to add your frontend numbering. Do you see anything else missing?

My JSON config file, for reference:

{
    "solutionPath": "../Sources/MyApp.sln",
    "outputDirectory": "../Sources/Spa/app",
    "rootNamespace": "MyApp",
    "splitIntoApps": true,
    "modelRoot": "common/model",
    "fetchPath": "common"
}

@JabX JabX requested a review from c3dr0x August 21, 2018 09:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant