UNPKG

1.58 kBJSONView Raw
1{
2 "$schema": "http://json-schema.org/schema",
3 "$id": "SchematicsRunCommands",
4 "title": "Create a custom target to run any command",
5 "description": "Create a custom target to run any command.",
6 "type": "object",
7 "cli": "nx",
8 "examples": [
9 {
10 "command": "nx g @nrwl/workspace:run-commands printhello --project my-feature-lib --command 'echo hello'",
11 "description": "Add the `printhello` target to `my-feature-lib`"
12 }
13 ],
14 "properties": {
15 "name": {
16 "type": "string",
17 "description": "Target name.",
18 "$default": {
19 "$source": "argv",
20 "index": 0
21 },
22 "x-prompt": "What name would you like to use to invoke the command?"
23 },
24 "project": {
25 "description": "Project name.",
26 "type": "string",
27 "x-prompt": "What project does the target belong to?",
28 "x-dropdown": "projects"
29 },
30 "command": {
31 "description": "Command to run.",
32 "type": "string",
33 "x-prompt": "What command would you like to run?"
34 },
35 "cwd": {
36 "description": "Current working directory of the command.",
37 "type": "string"
38 },
39 "outputs": {
40 "description": "Allows you to specify where the build artifacts are stored. This allows Nx Cloud to pick them up correctly, in the case that the build artifacts are placed somewhere other than the top level dist folder.",
41 "type": "string"
42 },
43 "envFile": {
44 "description": "Env files to be loaded before executing the commands.",
45 "type": "string"
46 }
47 },
48 "required": ["name", "command", "project"]
49}