Skip to content

More typos squashed #1477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions extending-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ my-app/
└── after-prepare (this is an executable file)
```

To support multiple scripts extending the same action, you ccan create a sud-directory in the `hooks` directory using the naming convention described bellow.
Tehn place the extending code into it. The CLI will execute them one after another but the order is not guaranteed.
To support multiple scripts extending the same action, you ccan create a sub-directory in the `hooks` directory using the naming convention described below.
When you place code files into that folder, the CLI executes each file one after another, but not in a guaranteed order.

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

- $logger: ILogger. Use the members of this class to show messages to the user cooperating with the CLI internal state.
- $projectData: IProjectData. Contains data about the project, like project directory, id, dependencies, etc.
- $usbLiveSyncService:ILiveSyncService. Use this service to invoke LiveSync for device or emulator.
- $usbLiveSyncService:ILiveSyncService. Use this variable to check whether a LiveSync or normal build is in progress.
- hookArgs: any. Contains all the parameters of the original function in the CLI which is being hooked.

The hook must return a Promise. If the hook succeeds, it must fullfil the promise, but the fullfilment value is ignored.
The hook can also rejects the promise with an instance of Error. The returned error can have two optional members controlling the CLI:
The hook can also reject the promise with an instance of Error. The returned error can have two optional members controlling the CLI:

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