172 lines
6.8 KiB
JSON
172 lines
6.8 KiB
JSON
{
|
|
"name": "application",
|
|
"factory": "./src/generators/application/application",
|
|
"schema": {
|
|
"$schema": "http://json-schema.org/schema",
|
|
"$id": "GeneratorNxApp",
|
|
"title": "Creates an Angular application.",
|
|
"description": "Creates an Angular application.",
|
|
"type": "object",
|
|
"cli": "nx",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the application.",
|
|
"type": "string",
|
|
"$default": { "$source": "argv", "index": 0 },
|
|
"x-prompt": "What name would you like to use for the application?",
|
|
"pattern": "^[a-zA-Z].*$"
|
|
},
|
|
"directory": {
|
|
"description": "The directory of the new application.",
|
|
"type": "string"
|
|
},
|
|
"style": {
|
|
"description": "The file extension to be used for style files.",
|
|
"type": "string",
|
|
"default": "css",
|
|
"enum": ["css", "scss", "sass", "less"],
|
|
"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": "sass",
|
|
"label": "SASS(.sass) [ http://sass-lang.com ]"
|
|
},
|
|
{
|
|
"value": "less",
|
|
"label": "LESS [ http://lesscss.org ]"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"routing": {
|
|
"type": "boolean",
|
|
"description": "Generate a routing module.",
|
|
"default": false,
|
|
"x-prompt": "Would you like to configure routing for this application?"
|
|
},
|
|
"inlineStyle": {
|
|
"description": "Specifies if the style will be in the ts file.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"alias": "s"
|
|
},
|
|
"inlineTemplate": {
|
|
"description": "Specifies if the template will be in the ts file.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"alias": "t"
|
|
},
|
|
"viewEncapsulation": {
|
|
"description": "Specifies the view encapsulation strategy.",
|
|
"enum": ["Emulated", "None", "ShadowDom"],
|
|
"type": "string"
|
|
},
|
|
"prefix": {
|
|
"type": "string",
|
|
"format": "html-selector",
|
|
"description": "The prefix to apply to generated selectors.",
|
|
"alias": "p"
|
|
},
|
|
"skipTests": {
|
|
"description": "Skip creating spec files.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"alias": "S"
|
|
},
|
|
"skipFormat": {
|
|
"description": "Skip formatting files.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"skipPackageJson": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Do not add dependencies to `package.json`."
|
|
},
|
|
"unitTestRunner": {
|
|
"type": "string",
|
|
"enum": ["karma", "jest", "none"],
|
|
"description": "Test runner to use for unit tests.",
|
|
"default": "jest"
|
|
},
|
|
"e2eTestRunner": {
|
|
"type": "string",
|
|
"enum": ["protractor", "cypress", "none"],
|
|
"description": "Test runner to use for end to end (E2E) tests. The `protractor` option is deprecated and it will be removed in v15.",
|
|
"default": "cypress"
|
|
},
|
|
"tags": {
|
|
"type": "string",
|
|
"description": "Add tags to the application (used for linting)."
|
|
},
|
|
"linter": {
|
|
"description": "The tool to use for running lint checks.",
|
|
"type": "string",
|
|
"enum": ["eslint", "none"],
|
|
"default": "eslint"
|
|
},
|
|
"backendProject": {
|
|
"type": "string",
|
|
"description": "Backend project that provides data to this application. This sets up `proxy.config.json`."
|
|
},
|
|
"strict": {
|
|
"type": "boolean",
|
|
"description": "Create an application with stricter type checking and build optimization options.",
|
|
"default": true
|
|
},
|
|
"standaloneConfig": {
|
|
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
|
"type": "boolean"
|
|
},
|
|
"port": {
|
|
"type": "number",
|
|
"description": "The port at which the remote application should be served."
|
|
},
|
|
"setParserOptionsProject": {
|
|
"type": "boolean",
|
|
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
|
"default": false
|
|
},
|
|
"addTailwind": {
|
|
"type": "boolean",
|
|
"description": "Whether to configure Tailwind CSS for the application.",
|
|
"default": false
|
|
},
|
|
"skipDefaultProject": {
|
|
"description": "Skip setting the project as the default project. When `false` (the default), the project is set as the default project only if there is no default project already set.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"standalone": {
|
|
"description": "Generate an application that is setup to use standalone components.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"rootProject": {
|
|
"description": "Create an application at the root of the workspace.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"hidden": true
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": ["name"],
|
|
"examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/angular:application my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Specify directory and style extension\" %}\n\nCreate an application named `my-app` in the `my-dir` directory and use `scss` for styles:\n\n```bash\nnx g @nrwl/angular:app my-app --directory=my-dir --style=scss\n```\n\n{% /tab %}\n\n{% tab label=\"Single File Components application\" %}\n\nCreate an application with Single File Components (inline styles and inline templates):\n\n```bash\nnx g @nrwl/angular:app my-app --inlineStyle --inlineTemplate\n```\n\n{% /tab %}\n\n{% tab label=\"Standalone Components application\" %}\n\nCreate an application that is setup to use standalone components:\n\n```bash\nnx g @nrwl/angular:app my-app --standalone\n```\n\n{% /tab %}\n\n{% tab label=\"Set custom prefix and tags\" %}\n\nSet the prefix to apply to generated selectors and add tags to the application (used for linting).\n\n```bash\nnx g @nrwl/angular:app my-app --prefix=admin --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n",
|
|
"presets": []
|
|
},
|
|
"aliases": ["app"],
|
|
"x-type": "application",
|
|
"description": "Creates an Angular application.",
|
|
"implementation": "/packages/angular/src/generators/application/application.ts",
|
|
"hidden": false,
|
|
"path": "/packages/angular/src/generators/application/schema.json",
|
|
"type": "generator"
|
|
}
|