You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extending-cli.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,8 @@ my-app/
29
29
└── after-prepare (this is an executable file)
30
30
```
31
31
32
-
To support multiple scripts extending the same action, you ccan create a sud-directory in the `hooks` directory using the naming convention described bellow.
33
-
Tehn place the extending code into it. The CLI will execute them one after another but the order is not guaranteed.
32
+
To support multiple scripts extending the same action, you ccan create a sub-directory in the `hooks` directory using the naming convention described below.
33
+
When you place code files into that folder, the CLI executes each file one after another, but not in a guaranteed order.
34
34
35
35
```
36
36
my-app/
@@ -61,11 +61,11 @@ The type of the parameters are described in the .d.ts files which are part of th
61
61
62
62
- $logger: ILogger. Use the members of this class to show messages to the user cooperating with the CLI internal state.
63
63
- $projectData: IProjectData. Contains data about the project, like project directory, id, dependencies, etc.
64
-
- $usbLiveSyncService:ILiveSyncService. Use this service to invoke LiveSync for device or emulator.
64
+
- $usbLiveSyncService:ILiveSyncService. Use this variable to check whether a LiveSync or normal build is in progress.
65
65
- hookArgs: any. Contains all the parameters of the original function in the CLI which is being hooked.
66
66
67
67
The hook must return a Promise. If the hook succeeds, it must fullfil the promise, but the fullfilment value is ignored.
68
-
The hook can also rejects the promise with an instance of Error. The returned error can have two optional members controlling the CLI:
68
+
The hook can also reject the promise with an instance of Error. The returned error can have two optional members controlling the CLI:
69
69
70
70
- stopExecution: boolean - set this to false to let the CLI continue executing this command
71
71
- errorAsWarning: boolean: set this to treat the returned error as warning. The CLI prints the error.message colored as a warning and continues executing the current command
0 commit comments