Skip to content

Commit b4d4aa0

Browse files
committed
Merge pull request #1477 from NativeScript/hooks-v3
More typos squashed
2 parents a4d422f + b18f27b commit b4d4aa0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

extending-cli.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ my-app/
2929
└── after-prepare (this is an executable file)
3030
```
3131

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.
3434

3535
```
3636
my-app/
@@ -61,11 +61,11 @@ The type of the parameters are described in the .d.ts files which are part of th
6161

6262
- $logger: ILogger. Use the members of this class to show messages to the user cooperating with the CLI internal state.
6363
- $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.
6565
- hookArgs: any. Contains all the parameters of the original function in the CLI which is being hooked.
6666

6767
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:
6969

7070
- stopExecution: boolean - set this to false to let the CLI continue executing this command
7171
- 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

Comments
 (0)