Skip to content

Commit 3fb2e2a

Browse files
Merge pull request #292 from NativeScript/vladimirov/show-context-specific-help
Show context specific help
2 parents 918adf0 + 7fc0c07 commit 3fb2e2a

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

lib/bootstrap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ $injector.requireCommand("emulate|ios", "./commands/emulate");
4040
$injector.require("npm", "./node-package-manager");
4141
$injector.require("lockfile", "./lockfile");
4242
$injector.require("optionsService", "./services/options-service");
43+
$injector.require("dynamicHelpProvider", "./dynamic-help-provider");

lib/dynamic-help-provider.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
///<reference path=".d.ts"/>
2+
3+
"use strict";
4+
5+
import Future = require("fibers/future");
6+
7+
export class DynamicHelpProvider implements IDynamicHelpProvider {
8+
constructor() { }
9+
10+
public isProjectType(args: string[]): IFuture<boolean> {
11+
return Future.fromResult(true);
12+
}
13+
14+
public getLocalVariables(): IFuture<IDictionary<any>> {
15+
var localVariables: IDictionary<any> = {};
16+
return Future.fromResult(localVariables);
17+
}
18+
}
19+
$injector.register("dynamicHelpProvider", DynamicHelpProvider);

resources/help.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,11 @@ Before running your app in the Android emulator from the Android SDK, verify tha
358358
tools
359359
Before running your app in the Genymotion emulator, verify that your system meets the following requirements.
360360
* Verify that you have installed Genymotion.
361-
* On Windows and Linux systems, verify that you have added the Genymotion installation directory to the PATH environment variable.
362-
* On OS X systems, verify that you have added the following paths to the PATH environment variable.
361+
<% if(isLinux || isWindows) { %>* On Windows and Linux systems, verify that you have added the Genymotion installation directory to the PATH environment variable.<%}%>
362+
<% if(isMacOS) { %>* On OS X systems, verify that you have added the following paths to the PATH environment variable.
363363
* /Applications/Genymotion.app/Contents/MacOS/
364364
* /Applications/Genymotion Shell.app/Contents/MacOS/
365-
365+
<% } %>
366366
Options:
367367
--device - Specifies a connected device on which to run the app.
368368
You cannot use --device and --emulator simultaneously.
@@ -498,11 +498,11 @@ Before running your app in the Android emulator from the Android SDK, verify tha
498498
tools
499499
Before running your app in the Genymotion emulator, verify that your system meets the following requirements.
500500
* Verify that you have installed Genymotion.
501-
* On Windows and Linux systems, verify that you have added the Genymotion installation directory to the PATH environment variable.
502-
* On OS X systems, verify that you have added the following paths to the PATH environment variable.
501+
<% if(isLinux || isWindows) { %>* On Windows and Linux systems, verify that you have added the Genymotion installation directory to the PATH environment variable.<% } %>
502+
<% if(isMacOS) { %>* On OS X systems, verify that you have added the following paths to the PATH environment variable.
503503
* /Applications/Genymotion.app/Contents/MacOS/
504504
* /Applications/Genymotion Shell.app/Contents/MacOS/
505-
505+
<% } %>
506506
Options:
507507
--path - Specifies the directory that contains the project. If not specified, the project is searched
508508
for in the current directory and all directories above it.

0 commit comments

Comments
 (0)