-
-
Save luxifertran/dec8eef200a67871225dd08300a054ba to your computer and use it in GitHub Desktop.
How to setup GulpJS, TypeScript, and Typings also see https://github.com/angular/answers-app/pull/27/files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var tsProject = ts.createProject('tsconfig.json'); | |
var ts = require('gulp-typescript'); | |
gulp.task('build', function() { | |
return tsProject.src() | |
.pipe(ts(tsProject)) | |
.pipe(gulp.dest('dist')); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this file lives in typings/main.d.ts provided by `typings` | |
/// <reference path="main/ambient/angular-protractor/angular-protractor.d.ts" /> | |
/// <reference path="main/ambient/es6-shim/es6-shim.d.ts" /> | |
/// <reference path="main/ambient/hammerjs/hammerjs.d.ts" /> | |
/// <reference path="main/ambient/jasmine/jasmine.d.ts" /> | |
/// <reference path="main/ambient/ng2/ng2.d.ts" /> | |
/// <reference path="main/ambient/node/node.d.ts" /> | |
/// <reference path="main/ambient/selenium-webdriver/selenium-webdriver.d.ts" /> | |
/// <reference path="main/ambient/webpack/webpack.d.ts" /> | |
/// <reference path="main/ambient/zone/zone.d.ts" /> | |
/// <reference path="main/definitions/es6-promise/es6-promise.d.ts" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this file lives in src/main.ts and is your entry file | |
import {bootstrap} from 'angular2/platform/browser'; | |
import {App} from './app/app'; | |
bootstrap(App, []); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"module": "commonjs", | |
"target": "es5", | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true | |
}, | |
"files": [ | |
"typings/main.d.ts", | |
"src/main.ts" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment