-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react): Add federate-module generator (#19286)
- Loading branch information
1 parent
bda907c
commit 8ccd88c
Showing
15 changed files
with
822 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
docs/generated/packages/react/generators/federate-module.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{ | ||
"name": "federate-module", | ||
"factory": "./src/generators/federate-module/federate-module#federateModuleGenerator", | ||
"schema": { | ||
"$schema": "http://json-schema.org/schema", | ||
"cli": "nx", | ||
"$id": "NxReactFederateModule", | ||
"title": "Federate Module", | ||
"description": "Create a federated module, which can be loaded by a remote host.", | ||
"examples": [ | ||
{ | ||
"command": "nx g federate-module MyModule --path=./src/component/my-cmp.ts --remote=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": { | ||
"name": { | ||
"description": "The name of the module.", | ||
"type": "string", | ||
"$default": { "$source": "argv", "index": 0 }, | ||
"x-prompt": "What name would you like to use for the module?", | ||
"pattern": "^[a-zA-Z][^:]*$", | ||
"x-priority": "important" | ||
}, | ||
"path": { | ||
"type": "string", | ||
"description": "The path to locate the federated module.", | ||
"x-prompt": "What is the path to the module to be federated?" | ||
}, | ||
"remote": { | ||
"type": "string", | ||
"description": "The name of the remote.", | ||
"x-prompt": "What is/should the remote be named?" | ||
}, | ||
"projectNameAndRootFormat": { | ||
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).", | ||
"type": "string", | ||
"enum": ["as-provided", "derived"] | ||
}, | ||
"style": { | ||
"description": "The file extension to be used for style files.", | ||
"type": "string", | ||
"default": "css", | ||
"alias": "s", | ||
"x-prompt": { | ||
"message": "Which stylesheet format would you like to use?", | ||
"type": "list", | ||
"items": [ | ||
{ "value": "css", "label": "CSS" }, | ||
{ | ||
"value": "scss", | ||
"label": "SASS(.scss) [ http://sass-lang.com ]" | ||
}, | ||
{ | ||
"value": "less", | ||
"label": "LESS [ http://lesscss.org ]" | ||
}, | ||
{ | ||
"value": "styled-components", | ||
"label": "styled-components [ https://styled-components.com ]" | ||
}, | ||
{ | ||
"value": "@emotion/styled", | ||
"label": "emotion [ https://emotion.sh ]" | ||
}, | ||
{ | ||
"value": "styled-jsx", | ||
"label": "styled-jsx [ https://www.npmjs.com/package/styled-jsx ]" | ||
}, | ||
{ | ||
"value": "styl", | ||
"label": "DEPRECATD: Stylus(.styl) [ http://stylus-lang.com ]" | ||
}, | ||
{ "value": "none", "label": "None" } | ||
] | ||
} | ||
}, | ||
"linter": { | ||
"description": "The tool to use for running lint checks.", | ||
"type": "string", | ||
"enum": ["eslint"], | ||
"default": "eslint" | ||
}, | ||
"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.", | ||
"default": "jest" | ||
}, | ||
"e2eTestRunner": { | ||
"type": "string", | ||
"enum": ["cypress", "none"], | ||
"description": "Test runner to use for end to end (e2e) tests.", | ||
"default": "cypress" | ||
}, | ||
"host": { | ||
"type": "string", | ||
"description": "The host / shell application for this remote." | ||
} | ||
}, | ||
"required": ["name", "path", "remote"], | ||
"additionalProperties": false, | ||
"presets": [] | ||
}, | ||
"description": "Federate a module.", | ||
"hidden": false, | ||
"implementation": "/packages/react/src/generators/federate-module/federate-module#federateModuleGenerator.ts", | ||
"aliases": [], | ||
"path": "/packages/react/src/generators/federate-module/schema.json", | ||
"type": "generator" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
8ccd88c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-dev-nrwl.vercel.app