docs(web): add prioritize flags to web packages (#14281)

This commit is contained in:
Chau Tran 2023-02-01 08:20:57 -06:00 committed by GitHub
parent a41d625f91
commit d0c978e898
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 59 additions and 29 deletions

View File

@ -53,7 +53,8 @@
}, },
"publicHost": { "publicHost": {
"type": "string", "type": "string",
"description": "Public URL where the application will be served." "description": "Public URL where the application will be served.",
"x-priority": "important"
}, },
"open": { "open": {
"type": "boolean", "type": "boolean",
@ -74,9 +75,12 @@
}, },
"baseHref": { "baseHref": {
"type": "string", "type": "string",
"description": "Base url for the application being built." "description": "Base url for the application being built.",
"x-priority": "important"
} }
}, },
"additionalProperties": false,
"required": ["buildTarget"],
"presets": [] "presets": []
}, },
"description": "Serve a web application.", "description": "Serve a web application.",

View File

@ -64,7 +64,8 @@
"spa": { "spa": {
"type": "boolean", "type": "boolean",
"description": "Redirect 404 errors to index.html (useful for SPA's)", "description": "Redirect 404 errors to index.html (useful for SPA's)",
"default": false "default": false,
"x-priority": "important"
}, },
"staticFilePath": { "staticFilePath": {
"type": "string", "type": "string",

View File

@ -40,7 +40,8 @@
"description": "Only build the specified comma-separated formats (`esm,umd,cjs`)", "description": "Only build the specified comma-separated formats (`esm,umd,cjs`)",
"alias": "f", "alias": "f",
"items": { "type": "string", "enum": ["esm", "umd", "cjs"] }, "items": { "type": "string", "enum": ["esm", "umd", "cjs"] },
"default": ["esm"] "default": ["esm"],
"x-priority": "important"
}, },
"external": { "external": {
"type": "array", "type": "array",
@ -79,7 +80,8 @@
"x-completion-glob": "rollup?(*)@(.js|.ts)" "x-completion-glob": "rollup?(*)@(.js|.ts)"
} }
], ],
"description": "Path to a function which takes a rollup config and returns an updated rollup config." "description": "Path to a function which takes a rollup config and returns an updated rollup config.",
"x-priority": "important"
}, },
"extractCss": { "extractCss": {
"type": ["boolean", "string"], "type": ["boolean", "string"],
@ -119,7 +121,8 @@
"type": "string", "type": "string",
"enum": ["babel", "swc"], "enum": ["babel", "swc"],
"default": "babel", "default": "babel",
"description": "Which compiler to use." "description": "Which compiler to use.",
"x-priority": "important"
}, },
"javascriptEnabled": { "javascriptEnabled": {
"type": "boolean", "type": "boolean",

View File

@ -29,7 +29,8 @@
"type": "string", "type": "string",
"description": "The compiler to use.", "description": "The compiler to use.",
"enum": ["babel", "swc"], "enum": ["babel", "swc"],
"default": "babel" "default": "babel",
"x-priority": "important"
}, },
"outputPath": { "outputPath": {
"type": "string", "type": "string",
@ -48,11 +49,13 @@
}, },
"baseHref": { "baseHref": {
"type": "string", "type": "string",
"description": "Base url for the application being built." "description": "Base url for the application being built.",
"x-priority": "important"
}, },
"deployUrl": { "deployUrl": {
"type": "string", "type": "string",
"description": "URL where the application will be deployed." "description": "URL where the application will be deployed.",
"x-priority": "important"
}, },
"vendorChunk": { "vendorChunk": {
"type": "boolean", "type": "boolean",
@ -376,7 +379,8 @@
"type": "string", "type": "string",
"description": "Path to a function which takes a webpack config, some context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack", "description": "Path to a function which takes a webpack config, some context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack",
"x-completion-type": "file", "x-completion-type": "file",
"x-completion-glob": "webpack?(*)@(.js|.ts)" "x-completion-glob": "webpack?(*)@(.js|.ts)",
"x-priority": "important"
} }
}, },
"required": ["tsConfig", "main", "index"], "required": ["tsConfig", "main", "index"],

View File

@ -48,14 +48,16 @@
"type": "string", "type": "string",
"description": "The compiler to use", "description": "The compiler to use",
"enum": ["babel", "swc"], "enum": ["babel", "swc"],
"default": "babel" "default": "babel",
"x-priority": "important"
}, },
"bundler": { "bundler": {
"type": "string", "type": "string",
"description": "The bundler to use.", "description": "The bundler to use.",
"enum": ["webpack", "none", "vite"], "enum": ["webpack", "none", "vite"],
"default": "webpack", "default": "webpack",
"x-prompt": "Which bundler do you want to use?" "x-prompt": "Which bundler do you want to use?",
"x-priority": "important"
}, },
"linter": { "linter": {
"description": "The tool to use for running lint checks.", "description": "The tool to use for running lint checks.",
@ -66,7 +68,8 @@
"skipFormat": { "skipFormat": {
"description": "Skip formatting files", "description": "Skip formatting files",
"type": "boolean", "type": "boolean",
"default": false "default": false,
"x-priority": "internal"
}, },
"unitTestRunner": { "unitTestRunner": {
"type": "string", "type": "string",
@ -100,7 +103,7 @@
"x-deprecated": "Nx only supports standaloneConfig" "x-deprecated": "Nx only supports standaloneConfig"
} }
}, },
"required": [], "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/web:application my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Application using Vite as bundler\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/web:app my-app --bundler=vite\n```\n\n{% /tab %}\n\n{% tab label=\"Specify directory\" %}\n\nCreate an application named `my-app` in the `my-dir` directory:\n\n```bash\nnx g @nrwl/web:app my-app --directory=my-dir\n```\n\n{% /tab %}\n\n{% tab label=\"Add tags\" %}\n\nAdd tags to the application (used for linting).\n\n```bash\nnx g @nrwl/web:app my-app --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n", "examplesFile": "## Examples\n\n{% tabs %}\n{% tab label=\"Simple Application\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/web:application my-app\n```\n\n{% /tab %}\n\n{% tab label=\"Application using Vite as bundler\" %}\n\nCreate an application named `my-app`:\n\n```bash\nnx g @nrwl/web:app my-app --bundler=vite\n```\n\n{% /tab %}\n\n{% tab label=\"Specify directory\" %}\n\nCreate an application named `my-app` in the `my-dir` directory:\n\n```bash\nnx g @nrwl/web:app my-app --directory=my-dir\n```\n\n{% /tab %}\n\n{% tab label=\"Add tags\" %}\n\nAdd tags to the application (used for linting).\n\n```bash\nnx g @nrwl/web:app my-app --tags=scope:admin,type:ui\n```\n\n{% /tab %}\n{% /tabs %}\n",
"presets": [] "presets": []
}, },

View File

@ -50,7 +50,8 @@
}, },
"publicHost": { "publicHost": {
"type": "string", "type": "string",
"description": "Public URL where the application will be served." "description": "Public URL where the application will be served.",
"x-priority": "important"
}, },
"open": { "open": {
"type": "boolean", "type": "boolean",
@ -71,7 +72,10 @@
}, },
"baseHref": { "baseHref": {
"type": "string", "type": "string",
"description": "Base url for the application being built." "description": "Base url for the application being built.",
"x-priority": "important"
} }
} },
"additionalProperties": false,
"required": ["buildTarget"]
} }

View File

@ -66,7 +66,8 @@
"spa": { "spa": {
"type": "boolean", "type": "boolean",
"description": "Redirect 404 errors to index.html (useful for SPA's)", "description": "Redirect 404 errors to index.html (useful for SPA's)",
"default": false "default": false,
"x-priority": "important"
}, },
"staticFilePath": { "staticFilePath": {
"type": "string", "type": "string",

View File

@ -40,7 +40,8 @@
"type": "string", "type": "string",
"enum": ["esm", "umd", "cjs"] "enum": ["esm", "umd", "cjs"]
}, },
"default": ["esm"] "default": ["esm"],
"x-priority": "important"
}, },
"external": { "external": {
"type": "array", "type": "array",
@ -81,7 +82,8 @@
"x-completion-glob": "rollup?(*)@(.js|.ts)" "x-completion-glob": "rollup?(*)@(.js|.ts)"
} }
], ],
"description": "Path to a function which takes a rollup config and returns an updated rollup config." "description": "Path to a function which takes a rollup config and returns an updated rollup config.",
"x-priority": "important"
}, },
"extractCss": { "extractCss": {
"type": ["boolean", "string"], "type": ["boolean", "string"],
@ -100,7 +102,8 @@
"type": "string", "type": "string",
"enum": ["babel", "swc"], "enum": ["babel", "swc"],
"default": "babel", "default": "babel",
"description": "Which compiler to use." "description": "Which compiler to use.",
"x-priority": "important"
}, },
"javascriptEnabled": { "javascriptEnabled": {
"type": "boolean", "type": "boolean",

View File

@ -26,7 +26,8 @@
"type": "string", "type": "string",
"description": "The compiler to use.", "description": "The compiler to use.",
"enum": ["babel", "swc"], "enum": ["babel", "swc"],
"default": "babel" "default": "babel",
"x-priority": "important"
}, },
"outputPath": { "outputPath": {
"type": "string", "type": "string",
@ -45,11 +46,13 @@
}, },
"baseHref": { "baseHref": {
"type": "string", "type": "string",
"description": "Base url for the application being built." "description": "Base url for the application being built.",
"x-priority": "important"
}, },
"deployUrl": { "deployUrl": {
"type": "string", "type": "string",
"description": "URL where the application will be deployed." "description": "URL where the application will be deployed.",
"x-priority": "important"
}, },
"vendorChunk": { "vendorChunk": {
"type": "boolean", "type": "boolean",
@ -252,7 +255,8 @@
"type": "string", "type": "string",
"description": "Path to a function which takes a webpack config, some context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack", "description": "Path to a function which takes a webpack config, some context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack",
"x-completion-type": "file", "x-completion-type": "file",
"x-completion-glob": "webpack?(*)@(.js|.ts)" "x-completion-glob": "webpack?(*)@(.js|.ts)",
"x-priority": "important"
} }
}, },
"required": ["tsConfig", "main", "index"], "required": ["tsConfig", "main", "index"],

View File

@ -51,14 +51,16 @@
"type": "string", "type": "string",
"description": "The compiler to use", "description": "The compiler to use",
"enum": ["babel", "swc"], "enum": ["babel", "swc"],
"default": "babel" "default": "babel",
"x-priority": "important"
}, },
"bundler": { "bundler": {
"type": "string", "type": "string",
"description": "The bundler to use.", "description": "The bundler to use.",
"enum": ["webpack", "none", "vite"], "enum": ["webpack", "none", "vite"],
"default": "webpack", "default": "webpack",
"x-prompt": "Which bundler do you want to use?" "x-prompt": "Which bundler do you want to use?",
"x-priority": "important"
}, },
"linter": { "linter": {
"description": "The tool to use for running lint checks.", "description": "The tool to use for running lint checks.",
@ -69,7 +71,8 @@
"skipFormat": { "skipFormat": {
"description": "Skip formatting files", "description": "Skip formatting files",
"type": "boolean", "type": "boolean",
"default": false "default": false,
"x-priority": "internal"
}, },
"unitTestRunner": { "unitTestRunner": {
"type": "string", "type": "string",
@ -103,6 +106,6 @@
"x-deprecated": "Nx only supports standaloneConfig" "x-deprecated": "Nx only supports standaloneConfig"
} }
}, },
"required": [], "required": ["name"],
"examplesFile": "../../../docs/application-examples.md" "examplesFile": "../../../docs/application-examples.md"
} }