File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 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");
1919 * [getIOSAssetsStructure](#getiosassetsstructure)
2020 * [getAndroidAssetsStructure](#getandroidassetsstructure)
2121* [ extensibilityService] ( #extensibilityservice )
22+ * [pathToExtensions](#pathToExtensions)
2223 * [installExtension](#installextension)
2324 * [uninstallExtension](#uninstallextension)
2425 * [getInstalledExtensions](#getinstalledextensions)
@@ -290,6 +291,16 @@ interface IExtensionData {
290291 extensionName: string;
291292}
292293` ` `
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+ ` ` `
293304
294305### installExtension
295306Installs specified extension.
Original file line number Diff line number Diff line change @@ -4,14 +4,20 @@ import * as constants from "../constants";
44import { createRegExp , regExpEscape } from "../common/helpers" ;
55
66export class ExtensibilityService implements IExtensibilityService {
7- private get pathToExtensions ( ) : string {
8- return path . join ( this . $settingsService . getProfileDir ( ) , "extensions" ) ;
9- }
7+ private customPathToExtensions : string = null ;
108
119 private get pathToPackageJson ( ) : string {
1210 return path . join ( this . pathToExtensions , constants . PACKAGE_JSON_FILE_NAME ) ;
1311 }
1412
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+
1521 constructor ( private $fs : IFileSystem ,
1622 private $logger : ILogger ,
1723 private $packageManager : INodePackageManager ,
You can’t perform that action at this time.
0 commit comments