Jack Hsu 27edf71cef
feat(misc): make directory a required option for generators (#28093)
<!-- 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>
2024-10-01 09:29:44 -04:00

98 lines
3.1 KiB
JSON

{
"name": "application",
"factory": "./src/generators/application/application",
"schema": {
"$schema": "http://json-schema.org/schema",
"$id": "Application",
"title": "Application generator for React + rspack",
"type": "object",
"description": "React + Rspack application generator.",
"examples": [
{
"command": "nx g app myorg/myapp",
"description": "Generate `apps/myorg/myapp` and `apps/myorg/myapp-e2e`"
}
],
"properties": {
"directory": {
"type": "string",
"description": "The directory to nest the app under.",
"$default": { "$source": "argv", "index": 0 },
"x-prompt": "What directory would you like to use for the application?"
},
"name": {
"description": "The name of the application.",
"type": "string",
"pattern": "^[a-zA-Z].*$"
},
"framework": {
"type": "string",
"description": "The framework to use for the application.",
"x-prompt": "What framework do you want to use when generating this application?",
"enum": ["none", "react", "web", "nest"],
"alias": ["uiFramework"],
"x-priority": "important",
"default": "react"
},
"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": "styl",
"label": "Stylus(.styl) [ http://stylus-lang.com ]"
},
{
"value": "less",
"label": "LESS [ http://lesscss.org ]"
},
{ "value": "none", "label": "None" }
]
}
},
"unitTestRunner": {
"type": "string",
"description": "The unit test runner to use.",
"enum": ["none", "jest"],
"default": "jest"
},
"e2eTestRunner": {
"type": "string",
"description": "The e2e test runner to use.",
"enum": ["none", "cypress"],
"default": "cypress"
},
"tags": {
"type": "string",
"description": "Add tags to the application (used for linting).",
"alias": "t"
},
"monorepo": {
"type": "boolean",
"description": "Creates an integrated monorepo.",
"aliases": ["integrated"]
},
"rootProject": { "type": "boolean", "x-priority": "internal" }
},
"required": ["directory"],
"presets": []
},
"aliases": ["app"],
"x-type": "application",
"description": "React application generator.",
"implementation": "/packages/rspack/src/generators/application/application.ts",
"hidden": false,
"path": "/packages/rspack/src/generators/application/schema.json",
"type": "generator"
}