diff options
Diffstat (limited to 'gulpfile.js')
| -rw-r--r-- | gulpfile.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..7c897ce --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,23 @@ +const gulp = require('gulp'); +const ts = require('gulp-typescript'); +const JSON_FILES = ['src/*.json', 'src/**/*.json']; + +// pull in the project TypeScript config +const tsProject = ts.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('src/**/*.ts', ['scripts']); +}); + +gulp.task('assets', function() { + return gulp.src(JSON_FILES) + .pipe(gulp.dest('dist')); +}); + +gulp.task('default', ['watch', 'assets']); |
