You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -199,6 +205,66 @@ Returns the default content of "nsconfig.json" merged with the properties provid
199
205
getNsConfigDefaultContent(data?:Object): string
200
206
```
201
207
208
+
### getAssetsStructure
209
+
Gives information about the whole assets structure for both iOS and Android. For each of the platforms, the returned object will contain icons, splashBackgrounds, splashCenterImages and splashImages (only for iOS).
210
+
* Definition:
211
+
```TypeScript
212
+
/**
213
+
* Gives information about the whole assets structure for both iOS and Android.
214
+
* For each of the platforms, the returned object will contain icons, splashBackgrounds, splashCenterImages and splashImages (only for iOS).
215
+
* @param{IProjectDir}opts Object with a single property - projectDir. This is the root directory where NativeScript project is located.
216
+
* @returns{Promise<IAssetsStructure>} An object describing the current asset structure.
.then(assetsStructure=>console.log(`The current assets structure for Android is ${JSON.stringify(assetsStructure, null, 2)}.`))
265
+
.catch(err=>console.log("Failed to get assets structure."));
266
+
```
267
+
202
268
## extensibilityService
203
269
`extensibilityService` module gives access to methods for working with CLI's extensions - list, install, uninstall, load them. The extensions add new functionality to CLI, so once an extension is loaded, all methods added to it's public API are accessible directly through CLI when it is used as a library. Extensions may also add new commands, so they are accessible through command line when using NativeScript CLI.
Contains various constants related to NativeScript.
1015
1081
1082
+
## assetsGenerationService
1083
+
`assetsGenerationService` module allows generation of assets - icons and splashes.
1084
+
1085
+
### generateIcons
1086
+
The `generateIcons` method generates icons for specified platform (or both iOS and Android in case platform is not specified) and places them on correct location in the specified project.
1087
+
1088
+
* Definition:
1089
+
```TypeScript
1090
+
/**
1091
+
* Generate icons for iOS and Android
1092
+
* @param{IResourceGenerationData}iconsGenerationData Provides the data needed for icons generation
The `generateSplashScreens` method generates icons for specified platform (or both iOS and Android in case platform is not specified) and places them on correct location in the specified project.
1109
+
1110
+
* Definition:
1111
+
```TypeScript
1112
+
/**
1113
+
* Generate splash screens for iOS and Android
1114
+
* @param{ISplashesGenerationData}splashesGenerationData Provides the data needed for splash screens generation
CLI is designed as command line tool and when it is used as a library, it does not give you access to all of the methods. This is mainly implementation detail. Most of the CLI's code is created to work in command line, not as a library, so before adding method to public API, most probably it will require some modification.
1018
1132
For example the `$options` injected module contains information about all `--` options passed on the terminal. When the CLI is used as a library, the options are not populated. Before adding method to public API, make sure its implementation does not rely on `$options`.
0 commit comments