@@ -4,19 +4,20 @@ Development Workflow
4
4
## Project Structure
5
5
6
6
The repository contains several packages and apps:
7
- - ` tns-core-modules ` - The core NativeScript TypeScript modules used to develop NativeScript apps.
8
- - ` apps ` - UI app used for manual testing and automation.
9
- - ` e2e ` - applications and * e2e* tests.
10
- - ` tests ` - Unit tests app for the ` tns-core-modules ` .
11
- - ` tns-platform-declarations ` - TypeScript definitions for Android and iOS native APIs.
7
+ - ` tns-core-modules ` - The core NativeScript TypeScript modules used to develop NativeScript apps
8
+ - ` tns-core-modules-widgets ` - The native widgets (Java and Objective-C) used by the core NativeScript modules
9
+ - ` e2e/ui-tests-app ` - UI app used for manual testing and automation
10
+ - ` e2e ` - applications and * e2e* tests
11
+ - ` tests ` - Unit tests app for the ` tns-core-modules `
12
+ - ` tns-platform-declarations ` - TypeScript definitions for Android and iOS native APIs
12
13
13
14
Working with the repo is organized with npm scripts,
14
15
go and read through the ` scripts ` section in the [ package.json] ( ./package.json ) .
15
16
16
17
Managing dependencies:
17
18
- ` tns-core-modules ` depends on:
18
19
- ` tns-platform-declarations `
19
- - ` apps ` depends on:
20
+ - ` e2e/ui-tests-app ` depends on:
20
21
- ` tns-platform-declarations `
21
22
- ` tns-core-modules `
22
23
- ` e2e ` depends on:
@@ -26,71 +27,44 @@ Managing dependencies:
26
27
- ` tns-core-modules `
27
28
28
29
> NOTE: ` tns-core-modules ` depends on ` tns-core-modules-widgets ` ,
29
- this dependency contains native code and is rarely modified so for now it remains outside this repo.
30
30
31
31
## Initial Setup
32
32
33
33
Clone (or fork/clone) the repo:
34
34
35
- ``` bash
35
+ ``` bash
36
36
git clone https://github.com/NativeScript/NativeScript.git
37
37
```
38
38
39
- Install devDependencies :
39
+ Install dependencies :
40
40
41
- ``` bash
41
+ ``` bash
42
42
npm install
43
43
```
44
44
45
- <!-- -
46
- ## TypeScript
47
-
48
- The following commands are commonly used to compile the `tns-core-modules`:
49
- ```bash
50
- # Full tsc with type checking ~22.2s.
51
- tsc
52
-
53
- # Fast tsc ~11.2s.
54
- tsc --skipLibCheck
55
-
56
- # Fast watcher, ~4s. on save
57
- tsc --skipLibCheck -w
58
- ```
59
-
60
- NOTE: transpile `tns-core-modules` only.
61
-
62
- The modules have `typescript` as a devDependency so you should also be able to use the locally installed TypeScript compiler from node_modules:
63
-
64
- ```bash
65
- ./node_modules/.bin/tsc
66
- ```
67
-
68
- You can compile the TypeScript files in the `tns-core-modules` and `tns-platform-declarations` at once at the root of the repo:
69
-
70
- ```bash
71
- npm run tsc
72
- ```
73
- --->
74
-
75
45
## Running Unit Tests
76
46
77
- ```
78
- cd ./ tests
79
- tns run android| ios
47
+ ``` bash
48
+ cd tests
49
+ tns run android | ios
80
50
```
81
51
82
- ## Running the Test App
52
+ ## Running the UI Test App
83
53
84
- The test app is an ordinary NativeScript app that logs the test results as it go.
54
+ The UI test app is an ordinary NativeScript app that logs the test results on the go.
85
55
After the [ initial setup] ( #initial-setup ) you can run the tests with:
86
56
87
- ```
88
- # Make sure TypeScript is transpiled
89
- tsc
57
+ ``` bash
58
+ cd e2e/ui-tests-app
59
+
60
+ # Run the Android app
61
+ tns platform add android@next # NOTE: do not commit this change to package.json
62
+ tns run android
63
+
64
+ # Run the iOS app
65
+ tns platform add ios@next # NOTE: do not commit this change to package.json
66
+ tns run ios
90
67
91
- # Run the app
92
- tns run ios --path apps
93
- tns run android --path apps
94
68
```
95
69
96
70
## Running Another App
@@ -107,9 +81,6 @@ tns run ios
107
81
tns run android
108
82
```
109
83
110
- > Note: You still have to rebuild the TypeScript if you have made changes in the code of the core-modules.
111
-
112
-
113
84
## Platform declarations
114
85
To update the platform declarations (the ios.d.ts-es) you can run:
115
86
0 commit comments