-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgulpfile.js
30 lines (23 loc) · 853 Bytes
/
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
const gulp = require('gulp')
const ts = require('gulp-typescript')
const JSON_FILES = ['src/*.json', 'src/**/*.json']
const tsProject = ts.createProject('tsconfig.json')
gulp.task('compile', () => {
const tsResult = tsProject.src()
.pipe(tsProject());
return tsResult.js.pipe(gulp.dest('dist'))
});
gulp.task('assets', function () {
return gulp.src(JSON_FILES)
.pipe(gulp.dest('dist'));
});
gulp.task('partials', function () {
return gulp.src(['src/datasource-appdynamics/partials/*'])
.pipe(gulp.dest('dist/datasource-appdynamics/partials/'));
});
gulp.task('watch', ['compile'], () => {
gulp.watch('src/**/*.ts', ['compile']);
gulp.watch('src/**/*.json', ['assets']);
gulp.watch('src/datasource-appdynamics/partials/*', ['partials']);
})
gulp.task('default', ['watch', 'assets', 'partials']);