From d978424f3550f80260be236a158983e2ab404f8f Mon Sep 17 00:00:00 2001 From: Panayot Cankov Date: Wed, 26 Jul 2017 18:15:06 +0300 Subject: [PATCH] Add npm script to automate the tsc build for PRs on CI (#4599) * Add npm run ci to automate some ci stuff * Inlude node types for node_tests --- package.json | 3 +++ tsconfig.json | 8 +++++++- tsconfig.node-tests.json | 5 ++++- tsconfig.shared.json | 3 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c2422cf28..8ef32034b 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,9 @@ "scripts": { "setup": "npm run dev-link-tns-platform-declarations && npm run dev-link-tns-core-modules && npm run dev-link-tests && npm run dev-link-apps", "tsc": "node --max_old_space_size=4096 ./node_modules/typescript/bin/tsc", + "ci": "tsc && npm run tslint && npm run ci-apps && npm run ci-tests", + "ci-apps": "cd apps && npm i ../tns-core-modules ../tns-platform-declarations --save", + "ci-tests": "cd tests && npm i ../tns-core-modules ../tns-platform-declarations --save", "compile-all": "npm run tsc -- -p tsconfig.json --outDir bin/dist", "compile-modules": "npm run tsc -- -p tsconfig-modules.json --outDir bin/dist", "compile-check-base-dts": "npm run tsc -- -p tsconfig.base-dts.json", diff --git a/tsconfig.json b/tsconfig.json index fdde277ed..aa85749ce 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,5 +23,11 @@ "tns-core-modules/references.d.ts", "tns-platform-declarations/ios/objc-x86_64/", "node-tests/" - ] + ], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "tns-core-modules/*": ["tns-core-modules/*"] + } + } } diff --git a/tsconfig.node-tests.json b/tsconfig.node-tests.json index 951be1cca..efa880670 100644 --- a/tsconfig.node-tests.json +++ b/tsconfig.node-tests.json @@ -9,5 +9,8 @@ "tns-core-modules/declarations.d.ts", "tns-core-modules/es6-promise.d.ts", "node-tests/**/*.ts" - ] + ], + "compilerOptions": { + "types": ["node"] + } } diff --git a/tsconfig.shared.json b/tsconfig.shared.json index 7b755204d..ba55cc870 100644 --- a/tsconfig.shared.json +++ b/tsconfig.shared.json @@ -15,6 +15,7 @@ "reactNamespace": "UIBuilder", "lib": [ "es6", "dom" - ] + ], + "types": [] } }