Update the .travis.yml to npm pack the tns-platform-declarations, add lib: [] config in the tsconfig.json

This commit is contained in:
Panayot Cankov
2016-09-26 11:43:58 +03:00
parent 299203901e
commit 0e23f47a04
8 changed files with 28 additions and 15 deletions

View File

@ -32,7 +32,6 @@ before_script:
- nvm install $NODE_VERSION - nvm install $NODE_VERSION
- npm install -g grunt-cli - npm install -g grunt-cli
- npm install - npm install
- "(cd build/platform-declarations && npm install)"
- echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER --abi default/armeabi-v7a -c 12M - echo no | android create avd --force -n $AVD_NAME -t android-$EMULATOR_API_VER --abi default/armeabi-v7a -c 12M
- emulator -avd $AVD_NAME -no-audio -no-window & - emulator -avd $AVD_NAME -no-audio -no-window &
- android-wait-for-emulator - android-wait-for-emulator
@ -41,7 +40,7 @@ script:
- jdk_switcher use oraclejdk8 - jdk_switcher use oraclejdk8
- grunt default --verbose && - grunt default --verbose &&
FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/tns-core-modules/package.json").version);'` && FULL_PACKAGE_VERSION=`node -e 'console.log(require("./bin/dist/tns-core-modules/package.json").version);'` &&
(cd build/platform-declarations && grunt) && (cd tns-platform-declarations && npm pack) &&
wget -O ./nativescript.tgz "https://s3.amazonaws.com/nativescript-ci/build_result/nativescript.tgz" && wget -O ./nativescript.tgz "https://s3.amazonaws.com/nativescript-ci/build_result/nativescript.tgz" &&
echo no | npm install -g nativescript.tgz --ignore-scripts > /dev/null && tns usage-reporting disable && tns error-reporting disable && echo no | npm install -g nativescript.tgz --ignore-scripts > /dev/null && tns usage-reporting disable && tns error-reporting disable &&
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 && 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 &&

View File

@ -82,7 +82,7 @@ tns run android --path tests
``` ```
## Platform declarations ## Platform declarations
To update the platform declarations you can run: To update the platform declarations (the ios.d.ts-es) you can run:
``` ```
npm install npm install
npm run dev-declarations npm run dev-declarations

View File

@ -50,6 +50,7 @@
"test-android": "tns run android --path tests --justlaunch", "test-android": "tns run android --path tests --justlaunch",
"test-ios": "tns run ios --path tests --justlaunch", "test-ios": "tns run ios --path tests --justlaunch",
"test-watch-android": "npm run pretest && concurrently --kill-others \"npm run tsc-tiw\" \"tns livesync android --path tests --watch\"", "test-watch-android": "npm run pretest && concurrently --kill-others \"npm run tsc-tiw\" \"tns livesync android --path tests --watch\"",
"test-watch-ios": "npm run pretest && concurrently --kill-others \"npm run tsc-tiw\" \"tns livesync ios --path tests --watch\"" "test-watch-ios": "npm run pretest && concurrently --kill-others \"npm run tsc-tiw\" \"tns livesync ios --path tests --watch\"",
"prepublish": "echo \"If you are about to develop run:\nnpm run setup\nFor more information check DevelopmentWorkflow.md\""
} }
} }

View File

@ -8,6 +8,9 @@
"noImplicitAny": false, "noImplicitAny": false,
"noImplicitUseStrict": true, "noImplicitUseStrict": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"diagnostics": true "diagnostics": true,
"lib": [
"es2016"
]
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "tns-platform-declarations", "name": "tns-platform-declarations",
"version": "1.7.1", "version": "2.4.0",
"description": "Platform-specific TypeScript declarations for NativeScript for accessing native objects", "description": "Platform-specific TypeScript declarations for NativeScript for accessing native objects",
"main": "", "main": "",
"scripts": { "scripts": {

View File

@ -1 +0,0 @@
/// <reference path="./node_modules/typescript/lib/lib.core.es6.d.ts" />

View File

@ -3,10 +3,13 @@
"module": "commonjs", "module": "commonjs",
"target": "es5", "target": "es5",
"experimentalDecorators": true, "experimentalDecorators": true,
"noLib": true "lib": [
"es2016"
]
}, },
"exclude": [ "exclude": [
"ios/objc-x86_64", "ios/objc-x86_64",
"node_modules" "node_modules",
"package"
] ]
} }

View File

@ -10,22 +10,30 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"diagnostics": true, "diagnostics": true,
"sourceMap": true, "sourceMap": true,
"noLib": true "lib": [
"es2016"
]
}, },
"exclude": [ "exclude": [
"node_modules", "tns-platform-declarations/node_modules/",
"tns-platform-declarations/node_modules", "tns-platform-declarations/package/",
"tns-core-modules/node_modules", "tns-core-modules/node_modules/",
"tns-core-modules/package/",
"tests/node_modules", "tests/node_modules",
"tests/package/",
"tests/platforms", "tests/platforms",
"apps/node_modules", "apps/node_modules",
"apps/package/",
"apps/platforms", "apps/platforms",
"node_modules/",
"package/",
"bin", "bin",
"build", "build",
"Deploy", "Deploy",
"out", "out",
"obj", "obj",
"**/references.d.ts", "tns-platform-declarations/references.d.ts",
"tns-core-modules/references.d.ts",
"tns-platform-declarations/ios/objc-x86_64/" "tns-platform-declarations/ios/objc-x86_64/"
] ]
} }