rename ui modules

pull/3095/head
Thibault Duplessis 2017-05-28 18:32:14 +02:00
parent 6bca673786
commit d57d54def4
73 changed files with 17 additions and 17 deletions

View File

@ -7,7 +7,7 @@ mkdir -p public/compiled
ts_apps1="common chess"
ts_apps2="ceval game tree"
apps="site chat2 challenge2 notify2 learn insight editor puzzle round2 analyse lobby tournament tournamentSchedule simul perfStat dasher"
apps="site chat challenge notify learn insight editor puzzle round analyse lobby tournament tournamentSchedule simul perfStat dasher"
YARN_MUTEX="${TMPDIR-/tmp}/.yarn-mutex"
build_ts() {

View File

@ -27,7 +27,7 @@ function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.challenge2.js'))
.pipe(source('lichess.challenge.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
@ -39,14 +39,14 @@ watchedBrowserify.on("log", gutil.log);
gulp.task('dev', function() {
return build(true)
.bundle()
.pipe(source('lichess.challenge2.js'))
.pipe(source('lichess.challenge.js'))
.pipe(gulp.dest(destination));
});
gulp.task("prod", [], function() {
return build(false)
.bundle()
.pipe(source('lichess.challenge2.min.js'))
.pipe(source('lichess.challenge.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));

View File

@ -1,5 +1,5 @@
{
"name": "challenge2",
"name": "challenge",
"version": "2.0.0",
"description": "lichess.org challenge UI",
"author": "Thibault Duplessis",

View File

@ -27,7 +27,7 @@ function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.chat2.js'))
.pipe(source('lichess.chat.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
@ -39,14 +39,14 @@ watchedBrowserify.on("log", gutil.log);
gulp.task('dev', function() {
return build(true)
.bundle()
.pipe(source('lichess.chat2.js'))
.pipe(source('lichess.chat.js'))
.pipe(gulp.dest(destination));
});
gulp.task("prod", [], function() {
return build(false)
.bundle()
.pipe(source('lichess.chat2.min.js'))
.pipe(source('lichess.chat.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));

View File

@ -1,5 +1,5 @@
{
"name": "chat2",
"name": "chat",
"version": "2.0.0",
"description": "lichess.org chat UI",
"author": "Thibault Duplessis",

View File

@ -27,7 +27,7 @@ function bundle() {
return watchedBrowserify
.bundle()
.on('error', onError)
.pipe(source('lichess.notify2.js'))
.pipe(source('lichess.notify.js'))
.pipe(buffer())
.pipe(gulp.dest(destination));
}
@ -39,14 +39,14 @@ watchedBrowserify.on("log", gutil.log);
gulp.task('dev', function() {
return build(true)
.bundle()
.pipe(source('lichess.notify2.js'))
.pipe(source('lichess.notify.js'))
.pipe(gulp.dest(destination));
});
gulp.task("prod", [], function() {
return build(false)
.bundle()
.pipe(source('lichess.notify2.min.js'))
.pipe(source('lichess.notify.min.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest(destination));

View File

@ -1,5 +1,5 @@
{
"name": "notify2",
"name": "notify",
"version": "2.0.0",
"description": "lichess.org notifications UI",
"author": "Thibault Duplessis",

View File

@ -6,7 +6,7 @@ module.exports = {
round: function(puzzleId, win) {
return $.ajax({
method: 'POST',
url: '/training/' + puzzleId + '/round2',
url: '/training/' + puzzleId + '/round',
data: {
win: win ? 1 : 0
}

View File

@ -383,7 +383,7 @@ lichess.topMenuIntent = function() {
var $el = $('#challenge_app').html(lichess.initiatingHtml);
var isDev = $('body').data('dev');
lichess.loadCss('/assets/stylesheets/challengeApp.css');
lichess.loadScript("/assets/compiled/lichess.challenge2" + (isDev ? '' : '.min') + '.js').done(function() {
lichess.loadScript("/assets/compiled/lichess.challenge" + (isDev ? '' : '.min') + '.js').done(function() {
instance = LichessChallenge.default($el[0], {
data: data,
show: function() {
@ -422,7 +422,7 @@ lichess.topMenuIntent = function() {
var $el = $('#notify_app').html(lichess.initiatingHtml);
var isDev = $('body').data('dev');
lichess.loadCss('/assets/stylesheets/notifyApp.css');
lichess.loadScript("/assets/compiled/lichess.notify2" + (isDev ? '' : '.min') + '.js').done(function() {
lichess.loadScript("/assets/compiled/lichess.notify" + (isDev ? '' : '.min') + '.js').done(function() {
instance = LichessNotify.default($el.empty()[0], {
data: data,
incoming: incoming,

View File

@ -222,7 +222,7 @@ lichess.makeChat = function(id, data, callback) {
var isDev = document.body.getAttribute('data-dev');
lichess.loadCss('/assets/stylesheets/chat.css');
if (data.permissions.timeout) lichess.loadCss('/assets/stylesheets/chat.mod.css');
lichess.loadScript("/assets/compiled/lichess.chat2" + (isDev ? '' : '.min') + '.js').done(function() {
lichess.loadScript("/assets/compiled/lichess.chat" + (isDev ? '' : '.min') + '.js').done(function() {
(callback || $.noop)(LichessChat.default(document.getElementById(id), data));
});
};