From 3793287d62a5ba6590c169c756951df3ddc456db Mon Sep 17 00:00:00 2001 From: erikbarke Date: Fri, 25 Aug 2017 14:47:30 +0200 Subject: [PATCH] Testing source maps with karma-typescript-es6-transform", #144 --- examples/typescript-latest/karma.conf.js | 10 ++++++++++ examples/typescript-latest/package.json | 2 ++ examples/typescript-latest/src/hello.component.ts | 9 +++++++++ examples/typescript-latest/tsconfig.json | 3 ++- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/examples/typescript-latest/karma.conf.js b/examples/typescript-latest/karma.conf.js index 07b4835d..d2615c78 100644 --- a/examples/typescript-latest/karma.conf.js +++ b/examples/typescript-latest/karma.conf.js @@ -13,6 +13,16 @@ module.exports = function(config) { reporters: ["dots", "karma-typescript"], + karmaTypescriptConfig: { + bundlerOptions: { + exclude: ["slack-node", "nodemailer", "mailgun-js", "loggly", "hipchat-notifier"], + sourceMap: true + }, + coverageOptions: { + instrumentation: false + } + }, + browsers: ["Chrome"] }); }; diff --git a/examples/typescript-latest/package.json b/examples/typescript-latest/package.json index f064bbb0..1626638f 100644 --- a/examples/typescript-latest/package.json +++ b/examples/typescript-latest/package.json @@ -18,12 +18,14 @@ }, "dependencies": { "@types/jasmine": "^2.5.35", + "es6-object-assign": "^1.1.0", "jasmine-core": "^2.4.1", "karma": "^1.5.0", "karma-chrome-launcher": "^2.0.0", "karma-cli": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-typescript": "../../", + "karma-typescript-es6-transform": "^1.0.2", "typescript": "latest" }, "devDependencies": { diff --git a/examples/typescript-latest/src/hello.component.ts b/examples/typescript-latest/src/hello.component.ts index 681d009e..37ceb87a 100644 --- a/examples/typescript-latest/src/hello.component.ts +++ b/examples/typescript-latest/src/hello.component.ts @@ -1,11 +1,20 @@ import { HelloService } from "./hello-service.interface"; +require("es6-object-assign").polyfill(); + export class HelloComponent { constructor(private helloService: HelloService) {} public sayHello(): string { + let configureTransform = require("karma-typescript-es6-transform"); + let transform = configureTransform(); + transform.initialize({ + appenders: [], + level: "INFO" + }); + return this.helloService.sayHello(); } } diff --git a/examples/typescript-latest/tsconfig.json b/examples/typescript-latest/tsconfig.json index 67726e5f..f50ddc81 100644 --- a/examples/typescript-latest/tsconfig.json +++ b/examples/typescript-latest/tsconfig.json @@ -7,7 +7,8 @@ "target": "ES5", "sourceMap": true, "types" : [ - "jasmine" + "jasmine", + "node" ] }, "exclude": [