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:
@ -32,7 +32,7 @@
|
||||
* SUPPORTED TOKENS: <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
|
||||
|
@ -27,7 +27,7 @@ extract_snippets() {
|
||||
|
||||
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"
|
||||
node "$BIN" --root="$SNIPPET_DIR" --target="$TARGET_DIR" \
|
||||
--sourceext=".js|.ts|.xml|.html|.css"
|
||||
@ -41,9 +41,10 @@ extract_apiref() {
|
||||
rm -rf "$APIREF_DIR"
|
||||
|
||||
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"
|
||||
}
|
||||
|
||||
|
@ -1,37 +1,41 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmitOnError": true,
|
||||
"noEmitHelpers": true,
|
||||
"outDir": "../../dist/packages/core",
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"declaration": false,
|
||||
"noImplicitAny": false,
|
||||
"noImplicitUseStrict": true,
|
||||
"experimentalDecorators": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
]
|
||||
"lib": ["es6", "dom"],
|
||||
},
|
||||
"include": [
|
||||
"nativescript-core/**/*.d.ts"
|
||||
"../../packages/core/**/*.d.ts",
|
||||
],
|
||||
"exclude": [
|
||||
"nativescript-core/index.d.ts",
|
||||
"nativescript-core/ui/index.d.ts",
|
||||
"nativescript-core/ui/layouts/index.d.ts",
|
||||
// "../../packages/core/index.d.ts",
|
||||
|
||||
"../../packages/core/ui/layouts/index.d.ts",
|
||||
|
||||
"nativescript-core/references.d.ts",
|
||||
"nativescript-core/node_modules",
|
||||
"nativescript-core/ui/frame/transition-definitions.android.d.ts",
|
||||
"nativescript-core/platforms/*"
|
||||
// "../../packages/core/__tests__",
|
||||
|
||||
"../../packages/core/references.d.ts",
|
||||
"../../packages/core/node_modules",
|
||||
"../../node_modules",
|
||||
"../../packages/core/ui/frame/transition-definitions.android.d.ts",
|
||||
"../../packages/core/platforms/*"
|
||||
],
|
||||
"typedocOptions": {
|
||||
"out": "bin/dist/apiref",
|
||||
"includeDeclarations": true,
|
||||
"entryPoints": [
|
||||
"packages/core/index.d.ts",
|
||||
"packages/core"
|
||||
],
|
||||
"out": "dist/apiref",
|
||||
"name": "NativeScript",
|
||||
"theme": "./node_modules/nativescript-typedoc-theme",
|
||||
"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