Skip to content

Commit 43ceefd

Browse files
committed
Added npm run typedoc and npm run dev-typedoc scripts, read the DevelopmentWorkflow.mk
1 parent ed36106 commit 43ceefd

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

DevelopmentWorkflow.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,14 @@ npm run dev-declarations
8989
```
9090
This script will update the iOS declarations. Android tools are not integrated yet.
9191
The declarations are generated from the test app and will include the native code from tns-core-modules-widgets.
92+
93+
# Documentation API reference
94+
The following will build the API reference pages in `bin/dist/apiref`:
95+
```
96+
npm run typedoc
97+
```
98+
If you want to improve on the documentation you can also build and start up dev web server:
99+
```
100+
npm run dev-typedoc
101+
```
102+
The terminal will point the address you can open in your web browsed.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"shelljs": "^0.7.0",
3030
"time-grunt": "1.3.0",
3131
"tslint": "3.4.0",
32+
"typedoc": "0.4.5",
3233
"typescript": "^2.0.3"
3334
},
3435
"scripts": {
@@ -50,6 +51,8 @@
5051
"test-ios": "tns run ios --path tests --justlaunch",
5152
"test-watch-android": "npm run pretest && concurrently --kill-others \"npm run tsc-tiw\" \"tns livesync android --path tests --watch\"",
5253
"test-watch-ios": "npm run pretest && concurrently --kill-others \"npm run tsc-tiw\" \"tns livesync ios --path tests --watch\"",
53-
"prepublish": "echo \"Development reminder: npm run setup\n\""
54+
"prepublish": "echo \"Development reminder: npm run setup\n\"",
55+
"typedoc": "typedoc --tsconfig tsconfig.typedoc.json --out bin/dist/apiref --mode file --includeDeclarations --name NativeScript --theme ./node_modules/nativescript-typedoc-theme",
56+
"dev-typedoc": "npm run typedoc && cd bin/dist/apiref && http-server"
5457
}
5558
}

tsconfig.typedoc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compilerOptions": {
3+
"noEmitOnError": true,
4+
"noEmitHelpers": true,
5+
"target": "es5",
6+
"module": "commonjs",
7+
"declaration": false,
8+
"noImplicitAny": false,
9+
"noImplicitUseStrict": true,
10+
"experimentalDecorators": true
11+
},
12+
"files": [
13+
"tns-core-modules/tns-core-modules.d.ts"
14+
]
15+
}

0 commit comments

Comments
 (0)