<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes # --------- Co-authored-by: Colum Ferry <cferry09@gmail.com> Co-authored-by: Nicholas Cunningham <ndcunningham@gmail.com>
86 lines
3.1 KiB
JSON
86 lines
3.1 KiB
JSON
{
|
|
"name": "federate-module",
|
|
"factory": "./src/generators/federate-module/federate-module",
|
|
"schema": {
|
|
"$schema": "https://json-schema.org/schema",
|
|
"cli": "nx",
|
|
"$id": "NxReactFederateModule",
|
|
"title": "Federate Module",
|
|
"description": "Create a federated module, which is exposed by a remote and can be subsequently loaded by a host.",
|
|
"examples": [
|
|
{
|
|
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=my-remote-app --remoteDirectory=apps/my-remote-app",
|
|
"description": "Create a federated module from my-remote-app, that exposes my-cmp from ./src/component/my-cmp.ts as MyModule."
|
|
}
|
|
],
|
|
"type": "object",
|
|
"properties": {
|
|
"path": {
|
|
"type": "string",
|
|
"$default": { "$source": "argv", "index": 0 },
|
|
"description": "The path to locate the federated module.",
|
|
"x-prompt": "What is the path to the module to be federated?"
|
|
},
|
|
"name": {
|
|
"description": "The name of the module.",
|
|
"type": "string",
|
|
"x-prompt": "What name would you like to use for the module?",
|
|
"pattern": "^[a-zA-Z][^:]*$",
|
|
"x-priority": "important"
|
|
},
|
|
"remote": {
|
|
"type": "string",
|
|
"description": "The name of the remote.",
|
|
"x-prompt": "What is/should the remote be named?"
|
|
},
|
|
"remoteDirectory": {
|
|
"description": "The directory of the new remote application if one needs to be created.",
|
|
"type": "string"
|
|
},
|
|
"style": {
|
|
"description": "The file extension to be used for style files for the remote if one needs to be created.",
|
|
"type": "string",
|
|
"default": "css",
|
|
"enum": ["css", "scss", "sass", "less"]
|
|
},
|
|
"skipFormat": {
|
|
"description": "Skip formatting files.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"x-priority": "internal"
|
|
},
|
|
"unitTestRunner": {
|
|
"type": "string",
|
|
"enum": ["jest", "none"],
|
|
"description": "Test runner to use for unit tests of the remote if it needs to be created.",
|
|
"default": "jest"
|
|
},
|
|
"e2eTestRunner": {
|
|
"type": "string",
|
|
"enum": ["cypress", "none"],
|
|
"description": "Test runner to use for end to end (e2e) tests of the remote if it needs to be created.",
|
|
"default": "cypress"
|
|
},
|
|
"standalone": {
|
|
"description": "Whether to generate the remote application with standalone components if it needs to be created.",
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"host": {
|
|
"type": "string",
|
|
"description": "The host / shell application for this remote."
|
|
}
|
|
},
|
|
"required": ["name", "path", "remote"],
|
|
"additionalProperties": false,
|
|
"presets": []
|
|
},
|
|
"x-type": "application",
|
|
"description": "Create a federated module, which is exposed by a remote and can be subsequently loaded by a host.",
|
|
"implementation": "/packages/angular/src/generators/federate-module/federate-module.ts",
|
|
"aliases": [],
|
|
"hidden": false,
|
|
"path": "/packages/angular/src/generators/federate-module/schema.json",
|
|
"type": "generator"
|
|
}
|