forked from ingenieux/aws-sdk-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
46 lines (34 loc) · 918 Bytes
/
gulpfile.js
File metadata and controls
46 lines (34 loc) · 918 Bytes
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
var gulp = require('gulp');
var tsc = require('gulp-tsc');
var shell = require('gulp-shell');
var runseq = require('run-sequence');
var paths = {
tscripts : { src : ['app/src/**/*.ts'],
dest : 'app/build' }
};
gulp.task('default', ['watch']);
// ** Running ** //
gulp.task('run', shell.task([
'node app/build/app.js ../aws-sdk-js/apis'
]));
gulp.task('buildrun', function (cb) {
runseq('build', 'run', cb);
});
// ** Watching ** //
gulp.task('watch', function () {
gulp.watch(paths.tscripts.src, ['compile:typescript']);
});
gulp.task('watchrun', function () {
gulp.watch(paths.tscripts.src, runseq('compile:typescript', 'run'));
});
// ** Compilation ** //
gulp.task('build', ['compile:typescript']);
gulp.task('compile:typescript', function () {
return gulp
.src(paths.tscripts.src)
.pipe(tsc({
module: "commonjs",
emitError: false
}))
.pipe(gulp.dest(paths.tscripts.dest));
});