Skip to content

Instantly share code, notes, and snippets.

@luxifertran
Forked from PatrickJS/gulpfile.js
Created April 7, 2016 15:41
Show Gist options
  • Save luxifertran/dec8eef200a67871225dd08300a054ba to your computer and use it in GitHub Desktop.
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
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 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 lives in src/main.ts and is your entry file
import {bootstrap} from 'angular2/platform/browser';
import {App} from './app/app';
bootstrap(App, []);
{
"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