Permalink
Browse files

Migrated to TS 2.0

1 parent 862e317 commit f8158df6e51b95e86d3554fbd01bce470aa4f279 @remojansen committed Oct 16, 2016
Showing with 37 additions and 30 deletions.
  1. +7 −6 README.md
  2. +14 −4 gulpfile.js
  3. +14 −11 package.json
  4. +2 −0 tsconfig.json
  5. +0 −9 typings.json
View
@@ -3,6 +3,8 @@ Boilerplate Visual Studio Code TypeScript project.
Please visit [blog.wolksoftware.com](http://blog.wolksoftware.com/setting-up-your-typescript-vs-code-development-environment) to learn more about this template.
+> Note: The article uses TypeScript 1.8 and typings but this repository has been upgraded to TypeScript 2.0 and `@types` type definitions.
+
# How to use this template?
1) Download `.zip` and unzip it:
@@ -14,16 +16,15 @@ $ unzip master.zip
2) Install dependencies and their type definitions:
> Note: Before running the following commands, make sure you have [Node.js]() installed and
-that you have installed typings and gulp as global packages:
-```
-$ npm -g install gulp
-$ npm -g install typings
-```
+that you have installed gulp a global package:
+>
+> ```
+> $ npm -g install gulp
+> ```
```
$ cd ts-vscode-boilerplate
$ npm install
-$ typings install
```
3) Open in VS Code
View
@@ -20,12 +20,16 @@ var gulp = require("gulp"),
//* LINT
//******************************************************************************
gulp.task("lint", function() {
+
+ var config = { formatter: "verbose", emitError: (process.env.CI) ? true : false };
+
return gulp.src([
"source/**/**.ts",
"test/**/**.test.ts"
])
- .pipe(tslint({ }))
- .pipe(tslint.report("verbose"));
+ .pipe(tslint(config))
+ .pipe(tslint.report());
+
});
//******************************************************************************
@@ -39,7 +43,10 @@ gulp.task("build-app", function() {
"typings/main.d.ts/",
"source/interfaces/interfaces.d.ts"
])
- .pipe(tsc(tsProject))
+ .pipe(tsProject())
+ .on("error", function (err) {
+ process.exit(1);
+ })
.js.pipe(gulp.dest("source/"));
});
@@ -51,7 +58,10 @@ gulp.task("build-test", function() {
"typings/main.d.ts/",
"source/interfaces/interfaces.d.ts"
])
- .pipe(tsc(tsTestProject))
+ .pipe(tsTestProject())
+ .on("error", function (err) {
+ process.exit(1);
+ })
.js.pipe(gulp.dest("test/"));
});
View
@@ -20,19 +20,22 @@
},
"homepage": "https://github.com/remojansen/ts-vscode-boilerplate#readme",
"devDependencies": {
- "browser-sync": "^2.11.1",
- "browserify": "^13.0.0",
+ "@types/chai": "^3.4.34",
+ "@types/jquery": "^2.0.33",
+ "@types/mocha": "^2.2.32",
+ "browser-sync": "^2.17.3",
+ "browserify": "^13.1.0",
"chai": "^3.5.0",
"gulp": "^3.9.1",
- "gulp-istanbul": "^0.10.3",
- "gulp-mocha": "^2.2.0",
- "gulp-sourcemaps": "^1.6.0",
- "gulp-tslint": "^4.3.2",
- "gulp-typescript": "^2.11.0",
- "gulp-uglify": "^1.5.2",
- "run-sequence": "^1.1.5",
- "tslint": "^3.3.0",
- "typescript": "^1.7.5",
+ "gulp-istanbul": "^1.1.1",
+ "gulp-mocha": "^3.0.1",
+ "gulp-sourcemaps": "^2.1.1",
+ "gulp-tslint": "^6.1.2",
+ "gulp-typescript": "^3.0.2",
+ "gulp-uglify": "^2.0.0",
+ "run-sequence": "^1.2.2",
+ "tslint": "^3.15.1",
+ "typescript": "^2.0.3",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"wallabify": "0.0.14"
View
@@ -1,6 +1,8 @@
{
"compilerOptions": {
"target": "es5",
+ "lib": ["es6", "dom"],
+ "types": ["mocha"],
"sourceMap": true,
"module": "commonjs",
"moduleResolution": "node",
View
@@ -1,9 +0,0 @@
-{
- "dependencies": {},
- "devDependencies": {},
- "globalDependencies": {
- "chai": "github:DefinitelyTyped/DefinitelyTyped/chai/chai.d.ts#9c25433c84251bfe72bf0030a95edbbb2c81c9d5",
- "jquery": "github:DefinitelyTyped/DefinitelyTyped/jquery/jquery.d.ts#fab0b336b0414fac23963bde83f7d7077f6cf14c",
- "mocha": "github:DefinitelyTyped/DefinitelyTyped/mocha/mocha.d.ts#d6dd320291705694ba8e1a79497a908e9f5e6617"
- }
-}

0 comments on commit f8158df

Please sign in to comment.