mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
chore: fix docs generation
This commit is contained in:
@ -360,7 +360,6 @@ export const test_ObservableArray_spliceShouldRemoveSpecifiedNumberOfElementsSta
|
|||||||
export const test_ObservableArray_spliceShouldRemoveSpecifiedNumberOfElementsStartingFromSpecifiedIndexAndRaiseChangeEventWithCorrectArgs = function () {
|
export const test_ObservableArray_spliceShouldRemoveSpecifiedNumberOfElementsStartingFromSpecifiedIndexAndRaiseChangeEventWithCorrectArgs = function () {
|
||||||
let result: ChangedData<number>;
|
let result: ChangedData<number>;
|
||||||
|
|
||||||
// >> observable-array-splice-change
|
|
||||||
const array = new ObservableArray([1, 2, 3, 4]);
|
const array = new ObservableArray([1, 2, 3, 4]);
|
||||||
|
|
||||||
array.on(ObservableArray.changeEvent, (args: ChangedData<number>) => {
|
array.on(ObservableArray.changeEvent, (args: ChangedData<number>) => {
|
||||||
@ -377,7 +376,6 @@ export const test_ObservableArray_spliceShouldRemoveSpecifiedNumberOfElementsSta
|
|||||||
});
|
});
|
||||||
|
|
||||||
array.splice(1, 2);
|
array.splice(1, 2);
|
||||||
// << observable-array-splice-change
|
|
||||||
|
|
||||||
TKUnit.assert(result.eventName === ObservableArray.changeEvent && result.action === ChangeType.Splice && result.removed.length === 2 && result.index === 1 && result.addedCount === 0, "ObservableArray splice() should raise 'change' event with correct args!");
|
TKUnit.assert(result.eventName === ObservableArray.changeEvent && result.action === ChangeType.Splice && result.removed.length === 2 && result.index === 1 && result.addedCount === 0, "ObservableArray splice() should raise 'change' event with correct args!");
|
||||||
};
|
};
|
||||||
@ -385,7 +383,6 @@ export const test_ObservableArray_spliceShouldRemoveSpecifiedNumberOfElementsSta
|
|||||||
export const test_ObservableArray_spliceShouldAddSpecifiedNumberOfElementsStartingFromSpecifiedIndexAndRaiseChangeEventWithCorrectArgs = function () {
|
export const test_ObservableArray_spliceShouldAddSpecifiedNumberOfElementsStartingFromSpecifiedIndexAndRaiseChangeEventWithCorrectArgs = function () {
|
||||||
let result: ChangedData<number>;
|
let result: ChangedData<number>;
|
||||||
|
|
||||||
// >> observable-array-splice-change
|
|
||||||
const array = new ObservableArray([0]);
|
const array = new ObservableArray([0]);
|
||||||
|
|
||||||
array.on(ObservableArray.changeEvent, (args: ChangedData<number>) => {
|
array.on(ObservableArray.changeEvent, (args: ChangedData<number>) => {
|
||||||
@ -404,7 +401,6 @@ export const test_ObservableArray_spliceShouldAddSpecifiedNumberOfElementsStarti
|
|||||||
// Because their is only one item in the above array the item index should be
|
// Because their is only one item in the above array the item index should be
|
||||||
// normalized to Index 1.
|
// normalized to Index 1.
|
||||||
array.splice(2, 0, 1);
|
array.splice(2, 0, 1);
|
||||||
// << observable-array-splice-change
|
|
||||||
|
|
||||||
TKUnit.assert(result.eventName === ObservableArray.changeEvent && result.action === ChangeType.Splice && result.removed.length === 0 && result.index === 1 && result.addedCount === 1, "ObservableArray splice() should raise 'change' event with correct args!");
|
TKUnit.assert(result.eventName === ObservableArray.changeEvent && result.action === ChangeType.Splice && result.removed.length === 0 && result.index === 1 && result.addedCount === 1, "ObservableArray splice() should raise 'change' event with correct args!");
|
||||||
};
|
};
|
||||||
@ -412,7 +408,6 @@ export const test_ObservableArray_spliceShouldAddSpecifiedNumberOfElementsStarti
|
|||||||
export const test_ObservableArray_spliceShouldAddDeleteSpecifiedNumberOfElementsStartingFromSpecifiedIndexAndRaiseChangeEventWithCorrectArgs = function () {
|
export const test_ObservableArray_spliceShouldAddDeleteSpecifiedNumberOfElementsStartingFromSpecifiedIndexAndRaiseChangeEventWithCorrectArgs = function () {
|
||||||
let result: ChangedData<number>;
|
let result: ChangedData<number>;
|
||||||
|
|
||||||
// >> observable-array-splice-change
|
|
||||||
const array = new ObservableArray([0]);
|
const array = new ObservableArray([0]);
|
||||||
|
|
||||||
array.on(ObservableArray.changeEvent, (args: ChangedData<number>) => {
|
array.on(ObservableArray.changeEvent, (args: ChangedData<number>) => {
|
||||||
@ -431,7 +426,6 @@ export const test_ObservableArray_spliceShouldAddDeleteSpecifiedNumberOfElements
|
|||||||
// Because we are starting at index 2, their is NOTHING to delete
|
// Because we are starting at index 2, their is NOTHING to delete
|
||||||
// So the Starting index should actually be normalized to Index 1
|
// So the Starting index should actually be normalized to Index 1
|
||||||
array.splice(2, 2, 1);
|
array.splice(2, 2, 1);
|
||||||
// << observable-array-splice-change
|
|
||||||
|
|
||||||
TKUnit.assert(result.eventName === ObservableArray.changeEvent && result.action === ChangeType.Splice && result.removed.length === 0 && result.index === 1 && result.addedCount === 1, "ObservableArray splice() should raise 'change' event with correct args!");
|
TKUnit.assert(result.eventName === ObservableArray.changeEvent && result.action === ChangeType.Splice && result.removed.length === 0 && result.index === 1 && result.addedCount === 1, "ObservableArray splice() should raise 'change' event with correct args!");
|
||||||
};
|
};
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
"mocha-typescript": "^1.1.17",
|
"mocha-typescript": "^1.1.17",
|
||||||
"module-alias": "^2.2.2",
|
"module-alias": "^2.2.2",
|
||||||
"nativescript": "~7.1.0",
|
"nativescript": "~7.1.0",
|
||||||
|
"nativescript-typedoc-theme": "git://github.com/NativeScript/nativescript-typedoc-theme.git#master",
|
||||||
"node-sass": "~4.14.1",
|
"node-sass": "~4.14.1",
|
||||||
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
|
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
|
||||||
"parserlib": "^1.1.1",
|
"parserlib": "^1.1.1",
|
||||||
@ -57,6 +58,7 @@
|
|||||||
"ts-node": "~8.10.2",
|
"ts-node": "~8.10.2",
|
||||||
"ts-patch": "^1.2.5",
|
"ts-patch": "^1.2.5",
|
||||||
"tslint": "~6.1.2",
|
"tslint": "~6.1.2",
|
||||||
|
"typedoc": "^0.20.14",
|
||||||
"typescript": "~4.0.3",
|
"typescript": "~4.0.3",
|
||||||
"webpack": "~4.44.1",
|
"webpack": "~4.44.1",
|
||||||
"webpack-cli": "~3.3.12"
|
"webpack-cli": "~3.3.12"
|
||||||
|
8
packages/core/index.d.ts
vendored
8
packages/core/index.d.ts
vendored
@ -9,6 +9,7 @@ export type { NativeScriptConfig } from './config';
|
|||||||
export { iOSApplication, AndroidApplication } from './application';
|
export { iOSApplication, AndroidApplication } from './application';
|
||||||
export type { ApplicationEventData, LaunchEventData, OrientationChangedEventData, UnhandledErrorEventData, DiscardedErrorEventData, CssChangedEventData, LoadAppCSSEventData, AndroidActivityEventData, AndroidActivityBundleEventData, AndroidActivityRequestPermissionsEventData, AndroidActivityResultEventData, AndroidActivityNewIntentEventData, AndroidActivityBackPressedEventData, SystemAppearanceChangedEventData } from './application';
|
export type { ApplicationEventData, LaunchEventData, OrientationChangedEventData, UnhandledErrorEventData, DiscardedErrorEventData, CssChangedEventData, LoadAppCSSEventData, AndroidActivityEventData, AndroidActivityBundleEventData, AndroidActivityRequestPermissionsEventData, AndroidActivityResultEventData, AndroidActivityNewIntentEventData, AndroidActivityBackPressedEventData, SystemAppearanceChangedEventData } from './application';
|
||||||
import { systemAppearanceChanged, getMainEntry, getRootView, _resetRootView, getResources, setResources, setCssFileName, getCssFileName, loadAppCss, addCss, on, off, notify, hasListeners, run, orientation, getNativeApplication, hasLaunched, systemAppearance } from './application';
|
import { systemAppearanceChanged, getMainEntry, getRootView, _resetRootView, getResources, setResources, setCssFileName, getCssFileName, loadAppCss, addCss, on, off, notify, hasListeners, run, orientation, getNativeApplication, hasLaunched, systemAppearance } from './application';
|
||||||
|
import { AndroidApplication, iOSApplication } from './application';
|
||||||
export declare const Application: {
|
export declare const Application: {
|
||||||
launchEvent: string;
|
launchEvent: string;
|
||||||
displayedEvent: string;
|
displayedEvent: string;
|
||||||
@ -39,8 +40,8 @@ export declare const Application: {
|
|||||||
getNativeApplication: typeof getNativeApplication;
|
getNativeApplication: typeof getNativeApplication;
|
||||||
hasLaunched: typeof hasLaunched;
|
hasLaunched: typeof hasLaunched;
|
||||||
systemAppearance: typeof systemAppearance;
|
systemAppearance: typeof systemAppearance;
|
||||||
android: import('./application').AndroidApplication;
|
android: typeof AndroidApplication;
|
||||||
ios: import('./application').iOSApplication;
|
ios: typeof iOSApplication;
|
||||||
};
|
};
|
||||||
import { setString, getString, clear, flush, getAllKeys, getBoolean, getNumber, hasKey, remove, setBoolean, setNumber } from './application-settings';
|
import { setString, getString, clear, flush, getAllKeys, getBoolean, getNumber, hasKey, remove, setBoolean, setNumber } from './application-settings';
|
||||||
export declare const ApplicationSettings: {
|
export declare const ApplicationSettings: {
|
||||||
@ -73,13 +74,14 @@ export { VirtualArray } from './data/virtual-array';
|
|||||||
export type { ItemsLoading } from './data/virtual-array';
|
export type { ItemsLoading } from './data/virtual-array';
|
||||||
export { File, FileSystemEntity, Folder, knownFolders, path, getFileAccess } from './file-system';
|
export { File, FileSystemEntity, Folder, knownFolders, path, getFileAccess } from './file-system';
|
||||||
export type { HttpRequestOptions, HttpResponse, Headers, HttpResponseEncoding, HttpContent } from './http';
|
export type { HttpRequestOptions, HttpResponse, Headers, HttpResponseEncoding, HttpContent } from './http';
|
||||||
|
import { HttpRequestOptions, HttpResponse } from './http';
|
||||||
import { getFile, getImage, getJSON, getString as httpGetString } from './http';
|
import { getFile, getImage, getJSON, getString as httpGetString } from './http';
|
||||||
export declare const Http: {
|
export declare const Http: {
|
||||||
getFile: typeof getFile;
|
getFile: typeof getFile;
|
||||||
getImage: typeof getImage;
|
getImage: typeof getImage;
|
||||||
getJSON: typeof getJSON;
|
getJSON: typeof getJSON;
|
||||||
getString: typeof httpGetString;
|
getString: typeof httpGetString;
|
||||||
request: (options: import('./http').HttpRequestOptions) => Promise<import('./http').HttpResponse>;
|
request: (options: HttpRequestOptions) => Promise<HttpResponse>;
|
||||||
};
|
};
|
||||||
export { ImageAsset } from './image-asset';
|
export { ImageAsset } from './image-asset';
|
||||||
export type { ImageAssetOptions } from './image-asset';
|
export type { ImageAssetOptions } from './image-asset';
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
* SUPPORTED TOKENS: <lookup>
|
* SUPPORTED TOKENS: <lookup>
|
||||||
* DEFAULT VALUE: "<lookup>"
|
* DEFAULT VALUE: "<lookup>"
|
||||||
*/
|
*/
|
||||||
"projectFolder": "nativescript-core",
|
"projectFolder": "../../packages/core",
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor
|
* (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor
|
||||||
|
@ -27,7 +27,7 @@ extract_snippets() {
|
|||||||
|
|
||||||
npm install markdown-snippet-injector
|
npm install markdown-snippet-injector
|
||||||
|
|
||||||
for SNIPPET_DIR in {tests/app,apps/app,nativescript-core} ; do
|
for SNIPPET_DIR in {apps/automated,apps/toolbox,apps/ui,packages/core} ; do
|
||||||
echo "Extracting snippets from: $SNIPPET_DIR"
|
echo "Extracting snippets from: $SNIPPET_DIR"
|
||||||
node "$BIN" --root="$SNIPPET_DIR" --target="$TARGET_DIR" \
|
node "$BIN" --root="$SNIPPET_DIR" --target="$TARGET_DIR" \
|
||||||
--sourceext=".js|.ts|.xml|.html|.css"
|
--sourceext=".js|.ts|.xml|.html|.css"
|
||||||
@ -41,9 +41,10 @@ extract_apiref() {
|
|||||||
rm -rf "$APIREF_DIR"
|
rm -rf "$APIREF_DIR"
|
||||||
|
|
||||||
npm_install
|
npm_install
|
||||||
npm run typedoc
|
#npx api-extractor run --config tools/scripts/api-extractor.json --local --verbose && (cd packages/core && cat nativescript-core.header index.d.ts > tmp_file && mv tmp_file nativescript-core.d.ts)
|
||||||
|
npx typedoc --tsconfig tools/scripts/tsconfig.typedoc.json
|
||||||
|
|
||||||
mv "$DIST_DIR/apiref" "$APIREF_DIR"
|
mv "dist/apiref" "$APIREF_DIR"
|
||||||
archive_dist_dir "api-reference"
|
archive_dist_dir "api-reference"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,37 +1,41 @@
|
|||||||
{
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"noEmitOnError": true,
|
"outDir": "../../dist/packages/core",
|
||||||
"noEmitHelpers": true,
|
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"noImplicitAny": false,
|
"lib": ["es6", "dom"],
|
||||||
"noImplicitUseStrict": true,
|
|
||||||
"experimentalDecorators": true,
|
|
||||||
"lib": [
|
|
||||||
"es6",
|
|
||||||
"dom"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"nativescript-core/**/*.d.ts"
|
"../../packages/core/**/*.d.ts",
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"nativescript-core/index.d.ts",
|
// "../../packages/core/index.d.ts",
|
||||||
"nativescript-core/ui/index.d.ts",
|
|
||||||
"nativescript-core/ui/layouts/index.d.ts",
|
"../../packages/core/ui/layouts/index.d.ts",
|
||||||
|
|
||||||
"nativescript-core/references.d.ts",
|
// "../../packages/core/__tests__",
|
||||||
"nativescript-core/node_modules",
|
|
||||||
"nativescript-core/ui/frame/transition-definitions.android.d.ts",
|
"../../packages/core/references.d.ts",
|
||||||
"nativescript-core/platforms/*"
|
"../../packages/core/node_modules",
|
||||||
|
"../../node_modules",
|
||||||
|
"../../packages/core/ui/frame/transition-definitions.android.d.ts",
|
||||||
|
"../../packages/core/platforms/*"
|
||||||
],
|
],
|
||||||
"typedocOptions": {
|
"typedocOptions": {
|
||||||
"out": "bin/dist/apiref",
|
"entryPoints": [
|
||||||
"includeDeclarations": true,
|
"packages/core/index.d.ts",
|
||||||
|
"packages/core"
|
||||||
|
],
|
||||||
|
"out": "dist/apiref",
|
||||||
"name": "NativeScript",
|
"name": "NativeScript",
|
||||||
"theme": "./node_modules/nativescript-typedoc-theme",
|
"theme": "./node_modules/nativescript-typedoc-theme",
|
||||||
"excludeExternals": true,
|
"excludeExternals": true,
|
||||||
"externalPattern": "**/+(tns-core-modules|module).d.ts"
|
"externalPattern": "**/+(tns-core-modules|module).d.ts",
|
||||||
|
"exclude": [
|
||||||
|
"packages/core/__tests__",
|
||||||
|
"packages/core/**/*.ts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user