Skip to content

Commit 3e48e66

Browse files
committed
Add DevelopmentWorkflow.md
1 parent dfaf481 commit 3e48e66

File tree

2 files changed

+60
-1
lines changed

2 files changed

+60
-1
lines changed

DevelopmentWorkflow.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Development Workflow
2+
====================
3+
4+
## Full build
5+
This will create all deliverables from the NativeScript repo in the `bin/dist/*.tgz` folder:
6+
```
7+
npm install
8+
grunt
9+
```
10+
11+
## Using tns-core-modules from source in app
12+
This will register the location of the `tns-core-modules` sources as symlink in your npm:
13+
```
14+
cd tns-core-modules
15+
npm link
16+
```
17+
18+
To rebuild the JavaScript of the `tns-core-modules`, in the root of the NativeScript repo:
19+
```
20+
# this will update tns-core-modules.d.ts references with new .d.ts files
21+
grunt generate-tns-core-modules-dev-dts
22+
# this will rebuild the TS to JS
23+
tsc
24+
```
25+
26+
Then you can navigate to any NativeScript App and add the `tns-core-modules` from the NativeScript repo to the `node_modules/tns-core-modules` in the app with:
27+
```
28+
npm link tns-core-modules
29+
```
30+
You should be able to debug the App in VSCode, breakpoints in the `node_modules/tns-core-modules` TypeScript files should work.
31+
Changes in the App's `node_modules/tns-core-modules` will edit the files in the NativeScript repo so you should be able to easily add changes to git.
32+
33+
## Running mobile unit tests
34+
There is `tests` folder with regular NativeScript application that runs tests on the `tns-core-modules`.
35+
To run them (see Using tns-core-modules from source in app):
36+
```
37+
npm install
38+
grunt generate-tns-core-modules-dev-dts
39+
tsc
40+
41+
cd tns-core-modules
42+
npm link
43+
cd ..
44+
45+
cd tests
46+
npm link tns-core-modules
47+
cd ..
48+
49+
tns run [ios|android] --path tests
50+
```
51+
52+
You can rapidly apply canges to the `tns-core-modules` and `tests`, and to run the tests, at the root of the NativeScript repo, execute:
53+
```
54+
# optionally, if you have added new .d.ts files
55+
grunt generate-tns-core-modules-dev-dts
56+
57+
tsc
58+
tns run [ios|android] --path tests
59+
```

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"noImplicitAny": false,
1010
"noImplicitUseStrict": true,
1111
"experimentalDecorators": true,
12-
"diagnostics": false
12+
"diagnostics": true
1313
},
1414
"filesGlob": [
1515
"**/*.ts",

0 commit comments

Comments
 (0)