forked from valor-software/ngx-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
57 lines (50 loc) · 1.15 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
var gulp = require('gulp');
gulp.paths = {
tssrc: [
'**/*.ts',
'!node_modules/**/*',
'!dist/**/*',
'!typings/**/*',
'!**/*.{ts,coffee}.js'],
jssrc: [
'*.js',
'!angular2-bootstrap.js',
'gulp-tasks/*.js',
'!node_modules',
'!**/*.{ts,coffee}.js']
};
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');
});