Skip to content

Commit 0e23f47

Browse files
committed
Update the .travis.yml to npm pack the tns-platform-declarations, add lib: [] config in the tsconfig.json
1 parent 2992039 commit 0e23f47

File tree

8 files changed

+28
-15
lines changed

8 files changed

+28
-15
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ before_script:
3232
- nvm install $NODE_VERSION
3333
- npm install -g grunt-cli
3434
- npm install
35-
- "(cd build/platform-declarations && npm install)"
3635
- echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER --abi default/armeabi-v7a -c 12M
3736
- emulator -avd $AVD_NAME -no-audio -no-window &
3837
- android-wait-for-emulator
@@ -41,7 +40,7 @@ script:
4140
- jdk_switcher use oraclejdk8
4241
- grunt default --verbose &&
4342
FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/tns-core-modules/package.json").version);'` &&
44-
(cd build/platform-declarations && grunt) &&
43+
(cd tns-platform-declarations && npm pack) &&
4544
wget -O ./nativescript.tgz "https://s3.amazonaws.com/nativescript-ci/build_result/nativescript.tgz" &&
4645
echo no | npm install -g nativescript.tgz --ignore-scripts > /dev/null && tns usage-reporting disable && tns error-reporting disable &&
4746
grunt buildOnlyTestsApp --verbose --platform=Android --modulesPath=./bin/dist/$PACKAGE_NAME-$FULL_PACKAGE_VERSION.tgz --runtimeVersion=$RUNTIMEVERSION --emuPId=.*emulator.* --avd=$AVD_NAME --showEmu=false > /dev/null &&

DevelopmentWorkflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ tns run android --path tests
8282
```
8383

8484
## Platform declarations
85-
To update the platform declarations you can run:
85+
To update the platform declarations (the ios.d.ts-es) you can run:
8686
```
8787
npm install
8888
npm run dev-declarations
8989
```
9090
This script will update the iOS declarations. Android tools are not integrated yet.
91-
The declarations are generated from the test app and will include the native code from tns-core-modules-widgets.
91+
The declarations are generated from the test app and will include the native code from tns-core-modules-widgets.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"test-android": "tns run android --path tests --justlaunch",
5151
"test-ios": "tns run ios --path tests --justlaunch",
5252
"test-watch-android": "npm run pretest && concurrently --kill-others \"npm run tsc-tiw\" \"tns livesync android --path tests --watch\"",
53-
"test-watch-ios": "npm run pretest && concurrently --kill-others \"npm run tsc-tiw\" \"tns livesync ios --path tests --watch\""
53+
"test-watch-ios": "npm run pretest && concurrently --kill-others \"npm run tsc-tiw\" \"tns livesync ios --path tests --watch\"",
54+
"prepublish": "echo \"If you are about to develop run:\nnpm run setup\nFor more information check DevelopmentWorkflow.md\""
5455
}
5556
}

tns-core-modules/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"noImplicitAny": false,
99
"noImplicitUseStrict": true,
1010
"experimentalDecorators": true,
11-
"diagnostics": true
11+
"diagnostics": true,
12+
"lib": [
13+
"es2016"
14+
]
1215
}
1316
}

tns-platform-declarations/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tns-platform-declarations",
3-
"version": "1.7.1",
3+
"version": "2.4.0",
44
"description": "Platform-specific TypeScript declarations for NativeScript for accessing native objects",
55
"main": "",
66
"scripts": {

tns-platform-declarations/references.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

tns-platform-declarations/tsconfig.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
"module": "commonjs",
44
"target": "es5",
55
"experimentalDecorators": true,
6-
"noLib": true
6+
"lib": [
7+
"es2016"
8+
]
79
},
810
"exclude": [
911
"ios/objc-x86_64",
10-
"node_modules"
12+
"node_modules",
13+
"package"
1114
]
1215
}

tsconfig.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,30 @@
1010
"experimentalDecorators": true,
1111
"diagnostics": true,
1212
"sourceMap": true,
13-
"noLib": true
13+
"lib": [
14+
"es2016"
15+
]
1416
},
1517
"exclude": [
16-
"node_modules",
17-
"tns-platform-declarations/node_modules",
18-
"tns-core-modules/node_modules",
18+
"tns-platform-declarations/node_modules/",
19+
"tns-platform-declarations/package/",
20+
"tns-core-modules/node_modules/",
21+
"tns-core-modules/package/",
1922
"tests/node_modules",
23+
"tests/package/",
2024
"tests/platforms",
2125
"apps/node_modules",
26+
"apps/package/",
2227
"apps/platforms",
28+
"node_modules/",
29+
"package/",
2330
"bin",
2431
"build",
2532
"Deploy",
2633
"out",
2734
"obj",
28-
"**/references.d.ts",
35+
"tns-platform-declarations/references.d.ts",
36+
"tns-core-modules/references.d.ts",
2937
"tns-platform-declarations/ios/objc-x86_64/"
3038
]
3139
}

0 commit comments

Comments
 (0)