-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
42 lines (29 loc) · 1.01 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
var gulp = require("gulp");
var gutil = require('gulp-util');
var typescript = require("gulp-typescript");
var sourcemaps = require('gulp-sourcemaps');
var merge = require('merge2');
var browserify = require('browserify');
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var uglify = require('gulp-uglify');
var gutil = require('gulp-util');
var tsify = require('tsify');
const chessProject = typescript.createProject("./tsconfig.chess.json", {declaration: true});
gulp.task('lift', ["compile"], function()
{
gulp.watch("source/**/*.ts", ["compile"]);
});
gulp.task('compile', ["chess-compile"]);
// Compile full bundle Chess + Chessboard
gulp.task("chess-compile", function ()
{
var tsResults = gulp.src("source/Chess/**/*.ts")
.pipe(sourcemaps.init())
.pipe(chessProject());
return merge([
tsResults.dts.pipe(gulp.dest('./build/Chess/')),
tsResults.js.pipe(sourcemaps.write('./')).pipe(gulp.dest('./build/Chess/'))
]);
});