diff --git a/package.json b/package.json index a6f5ef2..543956a 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,15 @@ "main": "index.js", "scripts": { "test": "karma start", - "start_universal": "node dist/app/main-server.js" + "start_universal": "node dist/app/main-server.js", + "clean-ng2": "rimraf node_modules/angular2/manual_typings", + "postinstall": "npm run clean-ng2" }, "author": "", "license": "MIT", "dependencies": { "angular2": "^2.0.0-beta.1", - "angular2-universal-preview": "^0.32.0", + "angular2-universal-preview": "^0.32.1", "es6-promise": "^3.0.2", "es6-shim": "^0.33.13", "express": "^4.13.3", @@ -34,10 +36,12 @@ "karma-firefox-launcher": "^0.1.7", "karma-jasmine": "^0.3.6", "karma-systemjs": "^0.10.0", + "rimraf": "^2.5.1", "systemjs": "^0.19.6", "systemjs-builder": "^0.14.11", "ts-node": "^0.5.4", "typescript": "^1.7.3", - "typescript-node": "^0.1.3" + "typescript-node": "^0.1.3", + "typings": "^0.6.2" } } diff --git a/src/main-server.ts b/src/main-server.ts index c716780..cf92851 100644 --- a/src/main-server.ts +++ b/src/main-server.ts @@ -1,5 +1,3 @@ -/// - import * as path from 'path'; import * as express from 'express'; import {SERVER_LOCATION_PROVIDERS, ng2engine} from 'angular2-universal-preview/dist/server'; diff --git a/src/services/Backend.ts b/src/services/Backend.ts index ef830bf..243c5a8 100644 --- a/src/services/Backend.ts +++ b/src/services/Backend.ts @@ -1,5 +1,3 @@ -/// - import * as Firebase from 'firebase'; import {Injectable} from 'angular2/core'; import {Observable} from 'rxjs/Observable'; @@ -37,4 +35,4 @@ export class Backend { authRequest.subscribe(this.authState); } -} \ No newline at end of file +} diff --git a/tasks/compile.ts b/tasks/compile.ts index 23f6cfa..7af3058 100644 --- a/tasks/compile.ts +++ b/tasks/compile.ts @@ -4,17 +4,12 @@ var Builder = require('systemjs-builder'); var util = require('gulp-util'); var ts = require('gulp-typescript'); +var tsProject = ts.createProject('tsconfig.json'); + export const compile = (gulp, config) => { gulp.task('compile:main-server', () => { - return gulp.src('src/**/*.ts') - .pipe(ts({ - noImplicitAny: false, - typescript: require('typescript'), - module: 'commonjs', - emitDecoratorMetadata: true, - experimentalDecorators: true, - moduleResolution: 'node' - })) + return tsProject.src() + .pipe(ts(tsProject)) .pipe(gulp.dest('dist/app')); }); diff --git a/tsconfig.json b/tsconfig.json index 9194698..4dd0479 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,10 +12,9 @@ "noResolve": false }, "files": [ - "src/main.ts", - "src/main-server.ts" - ], - "exclude": [ - "node_modules/" + "typings/main.d.ts", + "src/main.ts", + "src/main-server.ts", + "src/ng2-service-worker.ts" ] -} \ No newline at end of file +}