-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
52 lines (44 loc) · 1.41 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
var gulp = require('gulp')
var clean = require('gulp-clean')
var ts = require('gulp-typescript')
var tsProject = ts.createProject('tsconfig.json')
gulp.task('compile', function(){
return tsProject.src()
.pipe(tsProject())
.js.pipe(gulp.dest('dist'))
})
gulp.task('clean', function(){
return gulp
.src('dist')
.pipe(clean())
})
gulp.task('copy-opts', function(){
return gulp.src('tests/unit/config/mocha.opts')
.pipe(gulp.dest('dist/tests/unit/config'))
.pipe(gulp.dest('dist/tests/integration/config'))
})
gulp.task("copy-migration-config", function() {
return gulp.src('server/config/config.json')
.pipe(gulp.dest('dist/server/config'))
})
gulp.task("build", function() {
return gulp.src('server/migrations/*')
.pipe(gulp.dest('dist/server/migrations'))
})
gulp.task('default', gulp.series('clean','compile','copy-opts','copy-migration-config','build'))
/* jshint esversion:6 */
// const gulp = require('gulp');
// const gulpTypeScript = require('gulp-typescript');
//
// const tsProject = gulpTypeScript.createProject('tsconfig.json');
//
// gulp.task('scripts', () => {
// const tsResult = tsProject.src().pipe(tsProject());
// return tsResult.js.pipe(gulp.dest('dist'));
// });
//
// gulp.task('watch', ['scripts'], () => {
// gulp.watch('**/*.ts', ['scripts']);
// });
//
// gulp.task('default', ['watch']);