Base project

This commit is contained in:
2020-05-01 22:30:30 +02:00
parent 0e577bf803
commit fde17f7405
11 changed files with 5117 additions and 0 deletions

26
gulpfile.js Normal file
View File

@@ -0,0 +1,26 @@
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));