feat: task for regenerating api docs (nx run core-api-docs:build)

This commit is contained in:
Nathan Walker
2021-09-19 12:36:12 -07:00
parent ee701db137
commit f0ffb21626
6 changed files with 32 additions and 5 deletions

View File

@ -28,6 +28,9 @@
"core": {
"tags": []
},
"core-api-docs": {
"tags": []
},
"types": {
"tags": []
},

View File

@ -54,7 +54,7 @@
"mocha-typescript": "^1.1.17",
"module-alias": "^2.2.2",
"nativescript": "~8.1.2",
"nativescript-typedoc-theme": "1.0.0",
"nativescript-typedoc-theme": "1.1.0",
"parse-css": "git+https://github.com/tabatkins/parse-css.git",
"parserlib": "^1.1.1",
"prettier": "~2.2.1",

View File

@ -2,7 +2,7 @@
set -e
ENV="${ENV:-dev}"
DIST_DIR="bin/dist"
DIST_DIR="dist"
PACKAGE_VERSION="${PACKAGE_VERSION:-0.0.0}"
archive_dist_dir() {
@ -29,8 +29,8 @@ extract_apiref() {
# npm_install
npx typedoc --tsconfig tools/scripts/tsconfig.typedoc.json
mv "dist/apiref" "$APIREF_DIR"
archive_dist_dir "api-reference"
# mv "dist/apiref" "$APIREF_DIR"
# archive_dist_dir "api-reference"
}
if [ "${BASH_SOURCE[0]}" == "$0" ] ; then

View File

@ -23,7 +23,7 @@
],
"typedocOptions": {
"entryPoints": ["../../packages/core/index.d.ts", "../../packages/core"],
"out": "dist/apiref",
"out": "dist/api-reference",
"name": "NativeScript",
"theme": "../../node_modules/nativescript-typedoc-theme",
"excludeExternals": true,

View File

@ -99,6 +99,13 @@ module.exports = {
},
},
},
// @nativescript/core API Reference Docs
'core-api-docs': {
build: {
script: 'nx run core-api-docs:build',
description: '@nativescript/core: API Reference Docs Build'
}
},
// @nativescript/ui-mobile-base
'ui-mobile-base': {
build: {

View File

@ -158,6 +158,23 @@
}
}
},
"core-api-docs": {
"root": "tools/scripts",
"sourceRoot": "tools/scripts",
"projectType": "library",
"schematics": {},
"architect": {
"build": {
"builder": "@nrwl/workspace:run-commands",
"outputs": ["tools/scripts/dist"],
"options": {
"commands": ["./build-docs.sh"],
"cwd": "tools/scripts",
"parallel": false
}
}
}
},
"types": {
"root": "packages/types",
"sourceRoot": "packages/types",