Skip to content

Commit

Permalink
Add gulpfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachel Macfarlane committed Jun 22, 2018
1 parent c060f51 commit f14544a
Show file tree
Hide file tree
Showing 3 changed files with 1,486 additions and 36 deletions.
27 changes: 27 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const gulp = require('gulp');
const ts = require('gulp-typescript');
const typescript = require('typescript');
const del = require('del');
const mocha = require('gulp-mocha');
const gutil = require('gulp-util');

const tsProject = ts.createProject('tsconfig.json', { typescript });

gulp.task('build', ['clean'], () => {
const result = gulp.src("src/**/*.ts")
.pipe(tsProject());

return result.js.pipe(gulp.dest('out'));
});

gulp.task('clean', () => {
return del(['out']);
});

gulp.task('mocha', ['build'], () => {
return gulp.src(['out/test/**/*.js'], { read: false })
.pipe(mocha({ reporter: 'list' }))
.on('error', gutil.log);
});

gulp.task('default', ['mocha']);
Loading

0 comments on commit f14544a

Please sign in to comment.