refactor all UI gulpfiles

pull/4692/head
Thibault Duplessis 2018-11-07 16:25:06 +01:00
parent c5fe76fc89
commit 08161bc433
30 changed files with 170 additions and 1742 deletions

View File

@ -43,7 +43,7 @@
"chessground": "^7.3",
"common": "1.0.0",
"game": "1.0.0",
"snabbdom": "ornicar/snabbdom#lichess",
"snabbdom": "ornicar/snabbdom#0.7.1-lichess",
"tree": "1.0.0"
}
}

View File

@ -1,53 +1,3 @@
const gulp = require("gulp");
const browserify = require("browserify");
const source = require('vinyl-source-stream');
const tsify = require("tsify");
const watchify = require("watchify");
const gutil = require("gulp-util");
const uglify = require('gulp-uglify');
const buffer = require('vinyl-buffer');
const lilaGulp = require('../gulp/tsProject.js');
const destination = '../../public/compiled/';
function onError(error) {
return gutil.log(gutil.colors.red(error.message));
}
function build(debug) {
return browserify('src/main.ts', {
standalone: 'LichessChallenge',
debug: debug
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build(true));
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.challenge.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
gulp.task("default", [], bundle);
watchedBrowserify.on("update", bundle);
watchedBrowserify.on("log", gutil.log);
gulp.task('dev', function() {
return build(true)
.bundle()
.pipe(source('lichess.challenge.js'))
.pipe(gulp.dest(destination));
});
gulp.task("prod", [], function() {
return build(false)
.bundle()
.pipe(source('lichess.challenge.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
});
lilaGulp('LichessChallenge', 'lichess.challenge', __dirname);

View File

@ -9,18 +9,17 @@
},
"devDependencies": {
"@types/jquery": "^2.0",
"browserify": "^14",
"gulp": "^3",
"gulp-sourcemaps": "^2",
"gulp-typescript": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"@types/lichess": "1.0.0",
"typescript": "^2",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
}
}

View File

@ -1,53 +1,3 @@
const gulp = require("gulp");
const browserify = require("browserify");
const source = require('vinyl-source-stream');
const tsify = require("tsify");
const watchify = require("watchify");
const gutil = require("gulp-util");
const uglify = require('gulp-uglify');
const buffer = require('vinyl-buffer');
const lilaGulp = require('../gulp/tsProject.js');
const destination = '../../public/compiled/';
function onError(error) {
return gutil.log(gutil.colors.red(error.message));
}
function build(debug) {
return browserify('src/main.ts', {
standalone: 'LichessCli',
debug: debug
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build(true));
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.cli.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
gulp.task("default", [], bundle);
watchedBrowserify.on("update", bundle);
watchedBrowserify.on("log", gutil.log);
gulp.task('dev', function() {
return build(true)
.bundle()
.pipe(source('lichess.cli.js'))
.pipe(gulp.dest(destination));
});
gulp.task("prod", [], function() {
return build(false)
.bundle()
.pipe(source('lichess.cli.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
});
lilaGulp('LichessCli', 'lichess.cli', __dirname);

View File

@ -7,15 +7,17 @@
"dependencies": {},
"devDependencies": {
"@types/jquery": "^2.0",
"browserify": "^14",
"gulp": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"@types/lichess": "1.0.0",
"typescript": "^2",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
}
}

View File

@ -1,53 +1,3 @@
const gulp = require("gulp");
const browserify = require("browserify");
const source = require('vinyl-source-stream');
const tsify = require("tsify");
const watchify = require("watchify");
const gutil = require("gulp-util");
const uglify = require('gulp-uglify');
const buffer = require('vinyl-buffer');
const lilaGulp = require('../gulp/tsProject.js');
const destination = '../../public/compiled/';
function onError(error) {
return gutil.log(gutil.colors.red(error.message));
}
function build(debug) {
return browserify('src/main.ts', {
standalone: 'LichessDasher',
debug: debug
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build(true));
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.dasher.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
gulp.task("default", [], bundle);
watchedBrowserify.on("update", bundle);
watchedBrowserify.on("log", gutil.log);
gulp.task('dev', function() {
return build(true)
.bundle()
.pipe(source('lichess.dasher.js'))
.pipe(gulp.dest(destination));
});
gulp.task("prod", [], function() {
return build(false)
.bundle()
.pipe(source('lichess.dasher.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
});
lilaGulp('LichessDasher', 'lichess.dasher', __dirname);

View File

@ -10,15 +10,17 @@
"devDependencies": {
"@types/jquery": "^2.0",
"@types/jqueryui": "^1.11",
"browserify": "^14",
"gulp": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"@types/lichess": "1.0.0",
"typescript": "^2",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
}
}

View File

@ -1,52 +1,3 @@
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var watchify = require('watchify');
var browserify = require('browserify');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
const lilaGulp = require('../gulp/jsProject.js');
var sources = ['./src/main.js'];
var destination = '../../public/compiled/';
var onError = function(error) {
gutil.log(gutil.colors.red(error.message));
};
var standalone = 'LichessEditor';
gulp.task('prod', function() {
return browserify('./src/main.js', {
standalone: standalone
}).bundle()
.pipe(source('lichess.editor.min.js'))
.pipe(streamify(uglify()))
.pipe(gulp.dest(destination));
});
gulp.task('dev', function() {
return browserify('./src/main.js', {
standalone: standalone
}).bundle()
.pipe(source('lichess.editor.js'))
.pipe(gulp.dest(destination));
});
gulp.task('watch', function() {
var opts = watchify.args;
opts.debug = true;
opts.standalone = standalone;
var bundleStream = watchify(browserify(sources, opts))
.on('update', rebundle)
.on('log', gutil.log);
function rebundle() {
return bundleStream.bundle()
.on('error', onError)
.pipe(source('lichess.editor.js'))
.pipe(gulp.dest(destination));
}
return rebundle();
});
gulp.task('default', ['watch']);
lilaGulp('LichessEditor', 'lichess.editor', __dirname);

View File

@ -20,13 +20,14 @@
},
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"browserify": "^14",
"gulp": "^3",
"gulp-streamify": "^1",
"browserify": "^16",
"gulp": "^4",
"gulp-uglify": "^3",
"gulp-util": "^3",
"gulp-size": "^3",
"fancy-log": "^1",
"uglify-js": "^3",
"vinyl-source-stream": "^1",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"watchify": "^3"
},
"dependencies": {

View File

@ -1,52 +1,3 @@
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var watchify = require('watchify');
var browserify = require('browserify');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
const lilaGulp = require('../gulp/jsProject.js');
var sources = ['./src/main.js'];
var destination = '../../public/compiled/';
var onError = function(error) {
gutil.log(gutil.colors.red(error.message));
};
var standalone = 'LichessInsight';
gulp.task('prod', function() {
return browserify('./src/main.js', {
standalone: standalone
}).bundle()
.pipe(source('lichess.insight.min.js'))
.pipe(streamify(uglify()))
.pipe(gulp.dest(destination));
});
gulp.task('dev', function() {
return browserify('./src/main.js', {
standalone: standalone
}).bundle()
.pipe(source('lichess.insight.js'))
.pipe(gulp.dest(destination));
});
gulp.task('watch', function() {
var opts = watchify.args;
opts.debug = true;
opts.standalone = standalone;
var bundleStream = watchify(browserify(sources, opts))
.on('update', rebundle)
.on('log', gutil.log);
function rebundle() {
return bundleStream.bundle()
.on('error', onError)
.pipe(source('lichess.insight.js'))
.pipe(gulp.dest(destination));
}
return rebundle();
});
gulp.task('default', ['watch']);
lilaGulp('LichessInsight', 'lichess.insight', __dirname);

View File

@ -20,13 +20,14 @@
},
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"browserify": "^14",
"gulp": "^3",
"gulp-streamify": "^1",
"browserify": "^16",
"gulp": "^4",
"gulp-uglify": "^3",
"gulp-util": "^3",
"gulp-size": "^3",
"fancy-log": "^1",
"uglify-js": "^3",
"vinyl-source-stream": "^1",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"watchify": "^3"
},
"dependencies": {

View File

@ -1,52 +1,3 @@
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var watchify = require('watchify');
var browserify = require('browserify');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
const lilaGulp = require('../gulp/jsProject.js');
var sources = ['./src/main.js'];
var destination = '../../public/compiled/';
var onError = function(error) {
gutil.log(gutil.colors.red(error.message));
};
var standalone = 'LichessLearn';
gulp.task('prod', function() {
return browserify('./src/main.js', {
standalone: standalone
}).bundle()
.pipe(source('lichess.learn.min.js'))
.pipe(streamify(uglify()))
.pipe(gulp.dest(destination));
});
gulp.task('dev', function() {
return browserify('./src/main.js', {
standalone: standalone
}).bundle()
.pipe(source('lichess.learn.js'))
.pipe(gulp.dest(destination));
});
gulp.task('watch', function() {
var opts = watchify.args;
opts.debug = true;
opts.standalone = standalone;
var bundleStream = watchify(browserify(sources, opts))
.on('update', rebundle)
.on('log', gutil.log);
function rebundle() {
return bundleStream.bundle()
.on('error', onError)
.pipe(source('lichess.learn.js'))
.pipe(gulp.dest(destination));
}
return rebundle();
});
gulp.task('default', ['watch']);
lilaGulp('LichessLearn', 'lichess.learn', __dirname);

View File

@ -19,13 +19,14 @@
},
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"browserify": "^14",
"gulp": "^3",
"gulp-streamify": "^1",
"browserify": "^16",
"gulp": "^4",
"gulp-uglify": "^3",
"gulp-util": "^3",
"gulp-size": "^3",
"fancy-log": "^1",
"uglify-js": "^3",
"vinyl-source-stream": "^1",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"watchify": "^3"
},
"dependencies": {

View File

@ -1,54 +1,3 @@
const gulp = require('gulp');
const gutil = require('gulp-util');
const watchify = require('watchify');
const browserify = require('browserify');
const uglify = require('gulp-uglify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const tsify = require('tsify');
const destination = '../../public/compiled/';
function onError(error) {
gutil.log(gutil.colors.red(error.message));
}
function build() {
return browserify('src/main.ts', {
standalone: 'LichessLobby',
debug: true
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build());
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.lobby.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
gulp.task('default', bundle);
watchedBrowserify.on('update', bundle);
watchedBrowserify.on('log', gutil.log);
gulp.task('dev', function() {
return build()
.bundle()
.pipe(source('lichess.lobby.js'))
.pipe(gulp.dest(destination));
});
gulp.task('prod', function() {
return build()
.bundle()
.pipe(source('lichess.lobby.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
});
const lilaGulp = require('../gulp/tsProject.js');
lilaGulp('LichessLobby', 'lichess.lobby', __dirname);

View File

@ -22,14 +22,16 @@
"devDependencies": {
"@types/jquery": "^2.0",
"@types/lichess": "1.0.0",
"browserify": "^14",
"gulp": "^3",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"typescript": "^2",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {

View File

@ -1,53 +1,3 @@
const gulp = require("gulp");
const browserify = require("browserify");
const source = require('vinyl-source-stream');
const tsify = require("tsify");
const watchify = require("watchify");
const gutil = require("gulp-util");
const uglify = require('gulp-uglify');
const buffer = require('vinyl-buffer');
const lilaGulp = require('../gulp/tsProject.js');
const destination = '../../public/compiled/';
function onError(error) {
return gutil.log(gutil.colors.red(error.message));
}
function build(debug) {
return browserify('src/main.ts', {
standalone: 'LichessNotify',
debug: debug
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build(true));
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.notify.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
gulp.task("default", [], bundle);
watchedBrowserify.on("update", bundle);
watchedBrowserify.on("log", gutil.log);
gulp.task('dev', function() {
return build(true)
.bundle()
.pipe(source('lichess.notify.js'))
.pipe(gulp.dest(destination));
});
gulp.task("prod", [], function() {
return build(false)
.bundle()
.pipe(source('lichess.notify.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
});
lilaGulp('LichessNotify', 'lichess.notify', __dirname);

View File

@ -9,18 +9,17 @@
},
"devDependencies": {
"@types/jquery": "^2.0",
"browserify": "^14",
"gulp": "^3",
"gulp-sourcemaps": "^2",
"gulp-typescript": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"@types/lichess": "1.0.0",
"typescript": "^2",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
}
}

View File

@ -1,52 +1,3 @@
var source = require('vinyl-source-stream');
var gulp = require('gulp');
var gutil = require('gulp-util');
var watchify = require('watchify');
var browserify = require('browserify');
var uglify = require('gulp-uglify');
var streamify = require('gulp-streamify');
const lilaGulp = require('../gulp/jsProject.js');
var sources = ['./src/main.js'];
var destination = '../../public/compiled/';
var onError = function(error) {
gutil.log(gutil.colors.red(error.message));
};
var standalone = 'LichessPerfStat';
gulp.task('prod', function() {
return browserify('./src/main.js', {
standalone: standalone
}).bundle()
.pipe(source('lichess.perfStat.min.js'))
.pipe(streamify(uglify()))
.pipe(gulp.dest(destination));
});
gulp.task('dev', function() {
return browserify('./src/main.js', {
standalone: standalone
}).bundle()
.pipe(source('lichess.perfStat.js'))
.pipe(gulp.dest(destination));
});
gulp.task('watch', function() {
var opts = watchify.args;
opts.debug = true;
opts.standalone = standalone;
var bundleStream = watchify(browserify(sources, opts))
.on('update', rebundle)
.on('log', gutil.log);
function rebundle() {
return bundleStream.bundle()
.on('error', onError)
.pipe(source('lichess.perfStat.js'))
.pipe(gulp.dest(destination));
}
return rebundle();
});
gulp.task('default', ['watch']);
lilaGulp('LichessPerfStat', 'lichess.perfStat', __dirname);

View File

@ -20,13 +20,14 @@
},
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"browserify": "^14",
"gulp": "^3",
"gulp-streamify": "^1",
"browserify": "^16",
"gulp": "^4",
"gulp-uglify": "^3",
"gulp-util": "^3",
"gulp-size": "^3",
"fancy-log": "^1",
"uglify-js": "^3",
"vinyl-source-stream": "^1",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"watchify": "^3"
},
"dependencies": {

View File

@ -1,53 +1,3 @@
const gulp = require('gulp');
const gutil = require('gulp-util');
const watchify = require('watchify');
const browserify = require('browserify');
const uglify = require('gulp-uglify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const tsify = require('tsify');
const lilaGulp = require('../gulp/tsProject.js');
const destination = '../../public/compiled/';
function onError(error) {
gutil.log(gutil.colors.red(error.message));
}
function build() {
return browserify('src/main.ts', {
standalone: 'LichessPuzzle',
debug: true
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build());
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.puzzle.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
gulp.task('default', bundle);
watchedBrowserify.on('update', bundle);
watchedBrowserify.on('log', gutil.log);
gulp.task('dev', function() {
return build()
.bundle()
.pipe(source('lichess.puzzle.js'))
.pipe(gulp.dest(destination));
});
gulp.task('prod', function() {
return build()
.bundle()
.pipe(source('lichess.puzzle.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
});
lilaGulp('LichessPuzzle', 'lichess.puzzle', __dirname);

View File

@ -21,15 +21,17 @@
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"@types/jquery": "^2.0",
"browserify": "^14",
"gulp": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"@types/lichess": "1.0.0",
"typescript": "^2",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {

View File

@ -1,57 +1,3 @@
const gulp = require('gulp');
const gutil = require('gulp-util');
const watchify = require('watchify');
const browserify = require('browserify');
const uglify = require('gulp-uglify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const tsify = require('tsify');
const lilaGulp = require('../gulp/tsProject.js');
const destination = '../../public/compiled/';
function onError(error) {
gutil.log(gutil.colors.red(error.message));
}
function build(debug) {
return browserify('src/main.ts', {
standalone: 'LichessRound',
debug: debug
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build(true, false));
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.round.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
watchedBrowserify.on('update', bundle);
watchedBrowserify.on('log', gutil.log);
function dev() {
return () => build(true)
.bundle()
.pipe(source('lichess.round.js'))
.pipe(gulp.dest(destination));
};
gulp.task('dev', dev(false));
function prod() {
return () => build(false)
.bundle()
.pipe(source('lichess.round.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
}
gulp.task('prod', prod(false));
gulp.task('default', bundle);
lilaGulp('LichessRound', 'lichess.round', __dirname);

View File

@ -20,16 +20,17 @@
},
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"@types/jquery": "^2.0",
"@types/lichess": "1.0.0",
"browserify": "^14",
"gulp": "^3",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"typescript": "^2",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {

View File

@ -1,54 +1,3 @@
const gulp = require('gulp');
const gutil = require('gulp-util');
const watchify = require('watchify');
const browserify = require('browserify');
const uglify = require('gulp-uglify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const tsify = require('tsify');
const destination = '../../public/compiled/';
function onError(error) {
gutil.log(gutil.colors.red(error.message));
}
function build() {
return browserify('src/main.ts', {
standalone: 'LichessTournament',
debug: true
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build());
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.tournament.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
gulp.task('default', bundle);
watchedBrowserify.on('update', bundle);
watchedBrowserify.on('log', gutil.log);
gulp.task('dev', function() {
return build()
.bundle()
.pipe(source('lichess.tournament.js'))
.pipe(gulp.dest(destination));
});
gulp.task('prod', function() {
return build()
.bundle()
.pipe(source('lichess.tournament.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
});
const lilaGulp = require('../gulp/tsProject.js');
lilaGulp('LichessTournament', 'lichess.tournament', __dirname);

View File

@ -21,14 +21,16 @@
"devDependencies": {
"@types/jquery": "^2.0",
"@types/lichess": "1.0.0",
"browserify": "^14",
"gulp": "^3",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"typescript": "^2",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {

View File

@ -1,53 +1,3 @@
const gulp = require('gulp');
const gutil = require('gulp-util');
const watchify = require('watchify');
const browserify = require('browserify');
const uglify = require('gulp-uglify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const tsify = require('tsify');
const lilaGulp = require('../gulp/tsProject.js');
const destination = '../../public/compiled/';
function onError(error) {
gutil.log(gutil.colors.red(error.message));
}
function build() {
return browserify('src/main.ts', {
standalone: 'LichessTournamentCalendar',
debug: true
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build());
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.tournament-calendar.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
gulp.task('default', bundle);
watchedBrowserify.on('update', bundle);
watchedBrowserify.on('log', gutil.log);
gulp.task('dev', function() {
return build()
.bundle()
.pipe(source('lichess.tournament-calendar.js'))
.pipe(gulp.dest(destination));
});
gulp.task('prod', function() {
return build()
.bundle()
.pipe(source('lichess.tournament-calendar.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
});
lilaGulp('LichessTournamentCalendar', 'lichess.tournament-calendar', __dirname);

View File

@ -21,15 +21,17 @@
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"@types/jquery": "^2.0",
"browserify": "^14",
"gulp": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"@types/lichess": "1.0.0",
"typescript": "^2",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {

View File

@ -1,53 +1,3 @@
const gulp = require('gulp');
const gutil = require('gulp-util');
const watchify = require('watchify');
const browserify = require('browserify');
const uglify = require('gulp-uglify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const tsify = require('tsify');
const lilaGulp = require('../gulp/tsProject.js');
const destination = '../../public/compiled/';
function onError(error) {
gutil.log(gutil.colors.red(error.message));
}
function build() {
return browserify('src/main.ts', {
standalone: 'LichessTournamentSchedule',
debug: true
})
.plugin(tsify);
}
const watchedBrowserify = watchify(build());
function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.tournament-schedule.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
gulp.task('default', bundle);
watchedBrowserify.on('update', bundle);
watchedBrowserify.on('log', gutil.log);
gulp.task('dev', function() {
return build()
.bundle()
.pipe(source('lichess.tournament-schedule.js'))
.pipe(gulp.dest(destination));
});
gulp.task('prod', function() {
return build()
.bundle()
.pipe(source('lichess.tournament-schedule.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));
});
lilaGulp('LichessTournamentSchedule', 'lichess.tournament-schedule', __dirname);

View File

@ -22,14 +22,16 @@
"devDependencies": {
"@types/jquery": "^2.0",
"@types/lichess": "1.0.0",
"browserify": "^14",
"gulp": "^3",
"browserify": "^16",
"fancy-log": "^1",
"gulp": "^4",
"gulp-size": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"typescript": "^2",
"tsify": "^4",
"typescript": "^3",
"uglify-js": "^3",
"vinyl-source-stream": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {

953
yarn.lock

File diff suppressed because it is too large Load Diff