@nx/angular
Version:
85 lines (84 loc) • 3.15 kB
JSON
{
"$schema": "https://json-schema.org/schema",
"cli": "nx",
"$id": "NxReactFederateModule",
"title": "Federate Module",
"description": "Create a federated module, which is exposed by a Producer (remote) and can be subsequently loaded by a Consumer (host).",
"examples": [
{
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=myRemoteApp --remoteDirectory=apps/myRemoteApp",
"description": "Create a federated module from my-remote-app, that exposes my-cmp from ./src/component/my-cmp.ts as MyModule."
},
{
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --producer=myProducer --producerDirectory=apps/myProducer",
"description": "Create a federated module from myProducer, 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 Producer (remote).",
"x-prompt": "What is/should the Producer (remote) be named?",
"alias": "producer"
},
"remoteDirectory": {
"description": "The directory of the new Producer (remote) application if one needs to be created.",
"type": "string",
"alias": "producerDirectory"
},
"style": {
"description": "The file extension to be used for style files for the Producer (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", "vitest", "none"],
"description": "Test runner to use for unit tests of the Producer (remote) if it needs to be created.",
"x-prompt": "Which unit test runner would you like to use?",
"default": "jest"
},
"e2eTestRunner": {
"type": "string",
"enum": ["cypress", "none"],
"description": "Test runner to use for end to end (e2e) tests of the Producer (remote) if it needs to be created.",
"default": "cypress"
},
"standalone": {
"description": "Whether to generate the Producer (remote) application with standalone components if it needs to be created.",
"type": "boolean",
"default": true
},
"host": {
"type": "string",
"description": "The Consumer (host) application for this Producer (remote).",
"alias": "consumer"
}
},
"required": ["name", "path", "remote"],
"additionalProperties": false
}