Updated: angular2 0.42.0 integration
This commit is contained in:
29
gulpfile.js
29
gulpfile.js
@@ -17,41 +17,12 @@ gulp.paths = {
|
||||
|
||||
require('require-dir')('./gulp-tasks');
|
||||
|
||||
var typescript = require('gulp-tsc');
|
||||
var options = require('./tsconfig.json').compilerOptions;
|
||||
options.emitError = false;
|
||||
|
||||
var o = {
|
||||
target: 'es5',
|
||||
module: 'commonjs',
|
||||
outDir: 'dist',
|
||||
sourceRoot: 'dist',
|
||||
mapRoot: 'dist',
|
||||
keepTree: true,
|
||||
declaration: true,
|
||||
noEmitOnError: true,
|
||||
emitError: false,
|
||||
sourceMap: true,
|
||||
removeComments: true,
|
||||
noResolve: false,
|
||||
suppressImplicitAnyIndexErrors: true,
|
||||
safe: false,
|
||||
emitDecoratorMetadata: true,
|
||||
experimentalDecorators: true
|
||||
};
|
||||
|
||||
var clean = require('gulp-clean');
|
||||
gulp.task('clean', function () {
|
||||
return gulp.src('dist', {read: false})
|
||||
.pipe(clean());
|
||||
});
|
||||
|
||||
gulp.task('compile', ['clean'], function () {
|
||||
gulp.src(['components/**/*.ts'])
|
||||
.pipe(typescript(o))
|
||||
.pipe(gulp.dest(options.outDir));
|
||||
});
|
||||
|
||||
gulp.task('default', function () {
|
||||
gulp.start('lint');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user