Files
BindableProperty/gulpfile.js
2020-05-06 09:10:30 +02:00

25 lines
675 B
JavaScript

var gulp = require('gulp');
var ts = require('gulp-typescript');
var sourcemaps = require('gulp-sourcemaps');
var gulpif = require('gulp-if');
var tsProject = ts.createProject('tsconfig.json');
var del = require('del');
builder = function (production = true) {
return function () {
return tsProject
.src()
.pipe(gulpif(!production, sourcemaps.init()))
.pipe(tsProject())
.js.pipe(gulpif(!production, sourcemaps.write()))
.pipe(gulp.dest('dist'));
};
};
gulp.task('clean', function () {
return del('dist');
});
gulp.task('build', builder(false));
gulp.task('build:production', builder(true));