File tree 2 files changed +20
-3
lines changed
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const tns = require("nativescript");
19
19
* [getIOSAssetsStructure](#getiosassetsstructure)
20
20
* [getAndroidAssetsStructure](#getandroidassetsstructure)
21
21
* [ extensibilityService] ( #extensibilityservice )
22
+ * [pathToExtensions](#pathToExtensions)
22
23
* [installExtension](#installextension)
23
24
* [uninstallExtension](#uninstallextension)
24
25
* [getInstalledExtensions](#getinstalledextensions)
@@ -290,6 +291,16 @@ interface IExtensionData {
290
291
extensionName: string;
291
292
}
292
293
` ` `
294
+ ### pathToExtensions
295
+ Get/Set the to the CLI extensions.
296
+
297
+ * Definition:
298
+ ` ` ` TypeScript
299
+ /**
300
+ * The path to the CLI extensions.
301
+ */
302
+ pathToExtensions: string;
303
+ ` ` `
293
304
294
305
### installExtension
295
306
Installs specified extension.
Original file line number Diff line number Diff line change @@ -4,14 +4,20 @@ import * as constants from "../constants";
4
4
import { createRegExp , regExpEscape } from "../common/helpers" ;
5
5
6
6
export class ExtensibilityService implements IExtensibilityService {
7
- private get pathToExtensions ( ) : string {
8
- return path . join ( this . $settingsService . getProfileDir ( ) , "extensions" ) ;
9
- }
7
+ private customPathToExtensions : string = null ;
10
8
11
9
private get pathToPackageJson ( ) : string {
12
10
return path . join ( this . pathToExtensions , constants . PACKAGE_JSON_FILE_NAME ) ;
13
11
}
14
12
13
+ public get pathToExtensions ( ) : string {
14
+ return this . customPathToExtensions || path . join ( this . $settingsService . getProfileDir ( ) , "extensions" ) ;
15
+ }
16
+
17
+ public set pathToExtensions ( pathToExtensions : string ) {
18
+ this . customPathToExtensions = pathToExtensions ;
19
+ }
20
+
15
21
constructor ( private $fs : IFileSystem ,
16
22
private $logger : ILogger ,
17
23
private $packageManager : INodePackageManager ,
You can’t perform that action at this time.
0 commit comments