Skip to content
This repository was archived by the owner on Feb 10, 2023. It is now read-only.

Commit 2cfa948

Browse files
committed
feat(AoT): Skip emit of ts helpers
1 parent a77f68a commit 2cfa948

File tree

8 files changed

+21
-11
lines changed

8 files changed

+21
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ src/hooks
6969
src/node_modules
7070
src/*.js
7171
src/*.js.map
72+
src/*.d.ts
7273
src/*.metadata.json
7374
src/**/*.js
7475
src/**/*.js.map

Jenkinsfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ timeout(60) {
4242
}
4343

4444
stage('Publish NPM snapshot') {
45+
sh "npm run build"
4546
nodeJS.publishSnapshot('src', buildNumber, branchName)
4647
}
4748

src/index.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
export interface UrlHandlerCallback { (data: any): void; }
2-
export interface AppURL extends Object {
3-
path: string;
4-
params: Map<string, string>;
5-
}
6-
export function handleOpenURL(handler: UrlHandlerCallback): void;
1+
export * from './urlhandler';

src/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
"description": "Register custom URLs for your NativeScript app",
55
"scripts": {
66
"preclean": "npm i rimraf",
7-
"clean": "rimraf node_modules hooks platforms target 'angular.js' 'angular.d.ts' 'urlhandler.*.js' '*.*.d.ts' '*.ngsummary.json' '*.metadata.json' '*.js.map' 'test/e2e/**/*.js' 'test/e2e/**/*.js.map' test/e2e/platforms test/e2e/node_modules test/e2e/hooks",
7+
"clean": "rimraf node_modules hooks platforms target urlhandler.*.js urlhandler.*.d.ts *.ngsummary.json *.metadata.json *.js.map test/e2e/**/*.js test/e2e/**/*.js.map test/e2e/platforms test/e2e/node_modules test/e2e/hooks",
88
"postclean": "npm i",
99
"prebuild": "npm run tslint",
1010
"build": "npm run ngc",
1111
"tsc": "tsc",
1212
"ngc": "node --max-old-space-size=8192 ./node_modules/.bin/ngc",
1313
"tslint": "tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**'",
14-
"test": "npm run tslint && npm run jasmine",
14+
"pretest": "npm run tslint && tsc --p tsconfig.spec.json",
15+
"test": "npm run jasmine",
1516
"e2e": "npm run preparedemo && cd test/e2e && tns build ios && tns build android",
1617
"jasmine": "babel-node test/spec/run.js",
1718
"demo.ios": "npm run preparedemo && cd test/e2e && tns run ios --emulator",
@@ -79,7 +80,7 @@
7980
"tslib": "1.7.0",
8081
"tslint": "5.4.3",
8182
"tslint-eslint-rules": "4.1.0",
82-
"typescript": "2.5.1",
83+
"typescript": "2.6.1",
8384
"zone.js": "0.8.17"
8485
},
8586
"repository": {

src/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"pretty": true,
88
"removeComments": true,
99
"experimentalDecorators": true,
10-
"noEmitHelpers": false,
10+
"noEmitHelpers": true,
1111
"noEmitOnError": true,
1212
"skipDefaultLibCheck": true,
1313
"skipLibCheck": true,

src/tsconfig.spec.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"noEmitHelpers": false
5+
}
6+
}

src/urlhandler.common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AppURL, UrlHandlerCallback } from './index';
1+
import { AppURL, UrlHandlerCallback } from './urlhandler';
22
let URL_HANDLER_CB: UrlHandlerCallback;
33

44
/**

src/urlhandler.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export interface UrlHandlerCallback { (data: any): void; }
2+
export interface AppURL extends Object {
3+
path: string;
4+
params: Map<string, string>;
5+
}
6+
export function handleOpenURL(handler: UrlHandlerCallback): void;

0 commit comments

Comments
 (0)