Skip to content

Commit

Permalink
Testing source maps with karma-typescript-es6-transform", #144
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbarke committed Aug 25, 2017
1 parent fde750c commit 3793287
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
10 changes: 10 additions & 0 deletions examples/typescript-latest/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
});
};
2 changes: 2 additions & 0 deletions examples/typescript-latest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
9 changes: 9 additions & 0 deletions examples/typescript-latest/src/hello.component.ts
Original file line number Diff line number Diff line change
@@ -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();
}
}
3 changes: 2 additions & 1 deletion examples/typescript-latest/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"target": "ES5",
"sourceMap": true,
"types" : [
"jasmine"
"jasmine",
"node"
]
},
"exclude": [
Expand Down

0 comments on commit 3793287

Please sign in to comment.