Skip to content

Commit 87c2918

Browse files
Merge pull request #9 from NativeScript/milanov/bump-version-to-0.2.0
Update README.md
2 parents b5c2134 + ee2da50 commit 87c2918

File tree

3 files changed

+110
-9
lines changed

3 files changed

+110
-9
lines changed

README.md

+103-5
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,23 @@ Library that helps identifying if the environment can be used for development of
5050
* Describes warning returned from nativescript-doctor check.
5151
*/
5252
interface IWarning {
53-
/** The warning. */
53+
/**
54+
* The warning.
55+
* @type {string}
56+
*/
5457
warning: string;
55-
/** Additional information for the warning. */
58+
59+
/**
60+
* Additional information for the warning.
61+
* @type {string}
62+
*/
5663
additionalInformation: string;
64+
65+
/**
66+
* The platforms which are affected by this warning.
67+
* @type {string[]}
68+
*/
69+
platforms: string[];
5770
}
5871
```
5972

@@ -108,14 +121,23 @@ Library that helps identifying if the environment can be used for development of
108121
const isCocoaPodsWorkingCorrectly = await sysInfo.isCocoaPodsWorkingCorrectly();
109122
console.log("is cocoapods working correctly: ", isCocoaPodsWorkingCorrectly);
110123

124+
const nativeScriptCliVersion = await sysInfo.getNativeScriptCliVersion();
125+
console.log("{N} CLI version: ", nativeScriptCliVersion);
126+
127+
const xcprojInfo = await sysInfo.getXcprojInfo();
128+
console.log("xcproj info: ", xcprojInfo);
129+
130+
const isCocoaPodsUpdateRequired = await sysInfo.isCocoaPodsUpdateRequired();
131+
console.log("is CocoaPods update required: ", isCocoaPodsUpdateRequired);
132+
111133
const sysInfoData = await sysInfo.getSysInfo();
112134
console.log("sysInfo: ", sysInfoData);
113135
}
114136

115137
main();
116138

117139
```
118-
140+
119141
- Interfaces:
120142
```TypeScript
121143
/**
@@ -138,7 +160,7 @@ Library that helps identifying if the environment can be used for development of
138160
* Returns the currently installed version of Xcode.
139161
* @return {Promise<string>} Returns the currently installed version of Xcode or null if Xcode is not installed or executed on Linux or Windows.
140162
*/
141-
getXCodeVersion(): Promise<string>;
163+
getXcodeVersion(): Promise<string>;
142164

143165
/**
144166
* Returns the currently installed Node.js version.
@@ -156,7 +178,7 @@ Library that helps identifying if the environment can be used for development of
156178
* Returns the xcodeproj gem location.
157179
* @return {Promise<string>} Returns the xcodeproj gem location. If the the xcodeproj gem is not installed it will return null.
158180
*/
159-
getXCodeProjGemLocation(): Promise<string>;
181+
getXcodeprojGemLocation(): Promise<string>;
160182

161183
/**
162184
* Checks if iTunes is installed.
@@ -212,6 +234,24 @@ Library that helps identifying if the environment can be used for development of
212234
*/
213235
isCocoaPodsWorkingCorrectly(): Promise<boolean>;
214236

237+
/**
238+
* Returns the version of the globally installed NativeScript CLI.
239+
* @return {Promise<string>} Returns the version of the globally installed NativeScript CLI.
240+
*/
241+
getNativeScriptCliVersion(): Promise<string>;
242+
243+
/**
244+
* Checks if xcproj is required to build projects and if it is installed.
245+
* @return {Promise<IXcprojInfo>} Returns the collected information aboud xcproj.
246+
*/
247+
getXcprojInfo(): Promise<IXcprojInfo>;
248+
249+
/**
250+
* Checks if the current version of CocoaPods is compatible with the installed Xcode.
251+
* @return {boolean} true if an update us require.
252+
*/
253+
isCocoaPodsUpdateRequired(): Promise<boolean>;
254+
215255
/**
216256
* Returns the whole system information.
217257
* @return {Promise<ISysInfoData>} The system information.
@@ -342,5 +382,63 @@ Library that helps identifying if the environment can be used for development of
342382
* @type {boolean}
343383
*/
344384
isCocoaPodsWorkingCorrectly: boolean;
385+
386+
/**
387+
* NativeScript CLI version string, as returned by `tns --version`.
388+
* @type {string}
389+
*/
390+
nativeScriptCliVersion: string;
391+
392+
/**
393+
* Information about xcproj.
394+
* @type {string}
395+
*/
396+
xcprojInfo: IXcprojInfo
397+
398+
/**
399+
* true if the system requires xcproj to build projects successfully and the CocoaPods version is not compatible with the Xcode.
400+
*/
401+
isCocoaPodsUpdateRequired: boolean;
402+
}
403+
404+
/**
405+
* Describes information about xcproj brew formula.
406+
*/
407+
interface IXcprojInfo {
408+
/**
409+
* Determines whether the system needs xcproj to execute ios builds sucessfully.
410+
*/
411+
shouldUseXcproj: boolean;
412+
413+
/**
414+
* Determines whether xcproj can be called from the command line.
415+
*/
416+
xcprojAvailable: boolean;
417+
}
418+
```
419+
420+
* Module `constants`:
421+
- Usage:
422+
```TypeScript
423+
import { constants } from "nativescript-doctor"
424+
425+
function main() {
426+
for(let constantName in constants) {
427+
console.log(`${constantName}: ${constants[constantName]}`);
428+
}
429+
}
430+
431+
main();
432+
```
433+
434+
- Interfaces:
435+
```TypeScript
436+
/**
437+
* Describes the constants used in the module.
438+
*/
439+
interface IConstants {
440+
ANDROID_PLATFORM_NAME: string;
441+
IOS_PLATFORM_NAME: string;
442+
SUPPORTED_PLATFORMS: string[];
345443
}
346444
```

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-doctor",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Library that helps identifying if the environment can be used for development of {N} apps.",
55
"main": "lib/index.js",
66
"types": "./typings/nativescript-doctor.d.ts",

typings/interfaces.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -282,17 +282,20 @@ declare module NativeScriptDoctor {
282282
* Describes warning returned from nativescript-doctor check.
283283
*/
284284
interface IWarning {
285-
/** The warning.
285+
/**
286+
* The warning.
286287
* @type {string}
287288
*/
288289
warning: string;
289290

290-
/** Additional information for the warning.
291+
/**
292+
* Additional information for the warning.
291293
* @type {string}
292294
*/
293295
additionalInformation: string;
294296

295-
/** The platforms which are affected by this warning.
297+
/**
298+
* The platforms which are affected by this warning.
296299
* @type {string[]}
297300
*/
298301
platforms: string[];

0 commit comments

Comments
 (0)