From b0b56050aef16d0e52a8c9a68963613695a910ca Mon Sep 17 00:00:00 2001 From: James Richford Date: Tue, 3 Jan 2017 07:49:44 +0000 Subject: [PATCH] add TypeScript setup --- package.json | 6 +++++- src/karma-alsatian.ts | 1 + tsconfig.json | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/karma-alsatian.ts create mode 100644 tsconfig.json diff --git a/package.json b/package.json index 170d89e..561c6d5 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "1.0.0-alpha.0", "main": "src/karma-alsatian.js", "scripts": { + "build": "tsc", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -25,5 +26,8 @@ "bugs": { "url": "https://github.com/alsatian-test/karma-alsatian/issues" }, - "homepage": "https://github.com/alsatian-test/karma-alsatian#readme" + "homepage": "https://github.com/alsatian-test/karma-alsatian#readme", + "devDependencies": { + "typescript": "^2.1.4" + } } diff --git a/src/karma-alsatian.ts b/src/karma-alsatian.ts new file mode 100644 index 0000000..0b33e1b --- /dev/null +++ b/src/karma-alsatian.ts @@ -0,0 +1 @@ +console.log("success"); \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..293d243 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "noImplicitAny": true, + "declaration": true, + "sourceMap": false, + "preserveConstEnums": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true + }, + "buildOnSave": false, + "compileOnSave": true, + "exclude": [ + "./**/*.d.ts", + "node_modules" + ], + "include": [ + "./**/*.ts" + ], + "atom": { + "rewriteTsconfig": false + } +}