switch to yarn workspaces

pull/3843/head
Niklas Fiekas 2017-11-30 16:37:17 +01:00
parent 4bc6b91eca
commit b085fd736f
73 changed files with 4196 additions and 45616 deletions

View File

@ -10,7 +10,8 @@
"url": "https://github.com/ornicar/lila.git"
},
"keywords": [
"chess"
"chess",
"lichess"
],
"author": "Thibault Duplessis",
"license": "AGPL-3.0",
@ -21,5 +22,34 @@
"dependencies": {
"fs-extra": "^4.0.2",
"xml2js": "^0.4.19"
}
},
"private": true,
"workspaces": [
"ui/analyse",
"ui/ceval",
"ui/challenge",
"ui/chat",
"ui/chess",
"ui/cli",
"ui/common",
"ui/dasher",
"ui/editor",
"ui/game",
"ui/insight",
"ui/learn",
"ui/lobby",
"ui/notify",
"ui/perfStat",
"ui/puzzle",
"ui/round",
"ui/simul",
"ui/site",
"ui/tournament",
"ui/tournamentSchedule",
"ui/tree",
"ui/@types/defer-promise",
"ui/@types/lichess",
"ui/@types/lichess-jquery",
"ui/@types/mithril"
]
}

View File

@ -0,0 +1,6 @@
{
"name": "@types/defer-promise",
"version": "1.0.0",
"author": "Thibault Duplessis",
"license": "AGPL-3.0"
}

View File

@ -13,7 +13,6 @@ interface JQuery {
typeahead: any;
scrollTo(el: JQuery | HTMLElement, delay: number): JQuery;
sparkline: any;
slider: any;
clock: any;
watchers(): JQuery;
watchers(method: 'set', data: any): void;

View File

@ -0,0 +1,6 @@
{
"name": "@types/lichess-jquery",
"version": "1.0.0",
"author": "Thibault Duplessis",
"license": "AGPL-3.0"
}

View File

@ -1,5 +1,5 @@
{
"name": "types",
"name": "@types/lichess",
"version": "1.0.0",
"description": "lichess.org type declarations",
"author": "Thibault Duplessis",

View File

@ -0,0 +1,6 @@
{
"name": "@types/mithril",
"version": "1.0.0",
"author": "Thibault Duplessis",
"license": "AGPL-3.0"
}

View File

@ -23,25 +23,26 @@
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"@types/jquery": "^2.0",
"@types/lichess": "1.0.0",
"@types/lichess-jquery": "1.0.0",
"browserify": "^14",
"gulp": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"typescript": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {
"ceval": "link:../ceval",
"chat": "link:../chat",
"chess": "link:../chess",
"ceval": "1.0.0",
"chat": "2.0.0",
"chess": "1.0.0",
"chessground": "^7.2",
"common": "link:../common",
"game": "link:../game",
"common": "1.0.0",
"game": "1.0.0",
"snabbdom": "ornicar/snabbdom#lichess",
"tree": "link:../tree"
"tree": "1.0.0"
}
}

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess-jquery" />
import { AnalyseOpts } from './interfaces';
import AnalyseCtrl from './ctrl';

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
#!/bin/bash -ea
target=${1-dev}
mode=${2-build}
echo "building ui modules with target=$target and mode=$mode"
echo "building ui modules with target=$target"
cd "$(git rev-parse --show-toplevel)"
@ -12,27 +11,19 @@ ts_apps1="common chess"
ts_apps2="ceval game tree chat"
apps="site chat cli challenge notify learn insight editor puzzle round analyse lobby tournament tournamentSchedule simul perfStat dasher"
YARN_MUTEX="${TMPDIR-/tmp}/.yarn-mutex"
yarn install --non-interactive
build_ts() {
echo "build_ts" "$@"
set -ev
cd ui/$1
yarn install --non-interactive --mutex file:$YARN_MUTEX
if [ $mode == "upgrade" ]; then
yarn upgrade --non-interactive --mutex file:$YARN_MUTEX
fi
yarn run compile
}
build() {
echo "build" "$@"
set -ev
app=$1
cd ui/$app
yarn install --non-interactive --mutex file:$YARN_MUTEX
if [ $mode == "upgrade" ]; then
yarn upgrade --non-interactive --mutex file:$YARN_MUTEX
fi
cd ui/$1
gulp $target
}

View File

@ -4,10 +4,11 @@ mkdir public\compiled
set ts_apps=common chess ceval game tree chat
yarn install --non-interactive
for %%t in (%ts_apps%) do @(
call echo Building TypeScript: %%t
call cd ui\%%t
call yarn install --non-interactive
call yarn run compile --non-interactive
call cd ..\..
)
@ -17,7 +18,6 @@ set apps=site challenge notify learn insight editor puzzle round analyse lobby t
for %%a in (%apps%) do @(
call echo Building: %%a
call cd ui\%%a
call yarn install --non-interactive
call gulp dev
call cd ..\..
)

View File

@ -28,13 +28,14 @@
"devDependencies": {
"@types/jquery": "^2.0",
"@types/nodeunit": "0.0.30",
"@types/lichess": "1.0.0",
"@types/defer-promise": "1.0.0",
"nodeunit": "^0.11.0",
"types": "link:../types",
"typescript": "^2"
},
"dependencies": {
"chess": "link:../chess",
"common": "link:../common",
"chess": "1.0.0",
"common": "1.0.0",
"defer-promise": "^1.0.1",
"snabbdom": "ornicar/snabbdom#lichess"
}

View File

@ -1,6 +1,3 @@
/// <reference types="types/lichess" />
/// <reference types="types/defer-promise" />
import ctrl from './ctrl';
import * as view from './view';
import * as winningChances from './winningChances';

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
import { Test } from 'nodeunit';
import pv2san from '../src/pv2san';

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2",
"uglify-js": "^2",
"vinyl-buffer": "^1",

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode'

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2",
"uglify-js": "^2",
"vinyl-buffer": "^1",

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode'

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@
},
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2.2.2"
},
"dependencies": {}

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
import piotr from './piotr';
export const initialFen: Fen = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1';

View File

@ -1,11 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"types@link:../types":
version "0.0.0"
uid ""
typescript@^2.2.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"

View File

@ -12,7 +12,7 @@
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
export function app(wrap: HTMLElement, toggle: () => void) {
const $wrap = $(wrap), $input = $wrap.find('input');
window.lichess.userAutocomplete($input, {

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@
"compile": "tsc"
},
"devDependencies": {
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2"
},
"dependencies": {}

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
export function defined<A>(v: A | undefined): v is A {
return typeof v !== 'undefined';
}

View File

@ -1,11 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"types@link:../types":
version "0.0.0"
uid ""
typescript@^2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"

View File

@ -15,7 +15,7 @@
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
import { Redraw } from './util'
import { DasherCtrl, DasherOpts, makeCtrl } from './dasher';

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,7 @@
"compile": "tsc"
},
"devDependencies": {
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2"
},
"dependencies": {}

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
import { GameData, GameView, Player, Status, Source, Simul } from './interfaces';
import * as game from './game';

View File

@ -1,11 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"types@link:../types":
version "0.0.0"
uid ""
typescript@^2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"

View File

@ -30,7 +30,7 @@
"watchify": "^3"
},
"dependencies": {
"common": "link:../common",
"common": "1.0.0",
"mithril": "github:ornicar/mithril.js#lila-1",
"numeral": "^1.5"
}

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@
"dependencies": {
"chess.js": "github:ornicar/chess.js#learn",
"chessground": "github:ornicar/chessground#v4.4.0",
"common": "link:../common",
"common": "1.0.0",
"mithril": "github:ornicar/mithril.js#lila-1"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -21,12 +21,13 @@
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"@types/jquery": "^2.0",
"@types/lichess": "1.0.0",
"@types/lichess-jquery": "1.0.0",
"browserify": "^14",
"gulp": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"typescript": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
@ -34,7 +35,7 @@
},
"dependencies": {
"chessground": "^7.2",
"common": "link:../common",
"common": "1.0.0",
"snabbdom": "ornicar/snabbdom#lichess"
}
}

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
/// <reference types="types/lichess-jquery" />
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode'
import klass from 'snabbdom/modules/class';

View File

@ -1,4 +1,3 @@
/// <reference types="types/lichess-jquery" />
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import LobbyController from '../../ctrl';

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
/// <reference types="types/lichess-jquery" />
import { h } from 'snabbdom';
import { bind } from '../util';
import LobbyController from '../../ctrl';

View File

@ -1,4 +1,3 @@
/// <reference types="types/lichess" />
import { h } from 'snabbdom'
import LobbyController from '../../ctrl';
import { bind, tds, perfIcons } from '../util';

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2",
"uglify-js": "^2",
"vinyl-buffer": "^1",

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode'

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -26,18 +26,18 @@
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {
"ceval": "link:../ceval",
"chess": "link:../chess",
"ceval": "1.0.0",
"chess": "1.0.0",
"chessground": "^7.2",
"common": "link:../common",
"common": "1.0.0",
"snabbdom": "ornicar/snabbdom#lichess",
"tree": "link:../tree"
"tree": "1.0.0"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -21,22 +21,23 @@
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"@types/jquery": "^2.0",
"@types/lichess": "1.0.0",
"@types/lichess-jquery": "1.0.0",
"browserify": "^14",
"gulp": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"typescript": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {
"chat": "link:../chat",
"chat": "2.0.0",
"chessground": "^7.2",
"common": "link:../common",
"game": "link:../game",
"common": "1.0.0",
"game": "1.0.0",
"snabbdom": "ornicar/snabbdom#lichess"
}
}

View File

@ -1,6 +1,3 @@
/// <reference types="types/lichess" />
/// <reference types="types/lichess-jquery" />
import { Chessground } from 'chessground';
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode'

File diff suppressed because it is too large Load Diff

View File

@ -29,8 +29,8 @@
"watchify": "^3"
},
"dependencies": {
"chat": "link:../chat",
"game": "link:../game",
"chat": "2.0.0",
"game": "1.0.0",
"mithril": "github:ornicar/mithril.js#lila-1"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -20,22 +20,23 @@
"homepage": "https://github.com/ornicar/lila",
"devDependencies": {
"@types/jquery": "^2.0",
"@types/lichess": "1.0.0",
"@types/lichess-jquery": "1.0.0",
"browserify": "^14",
"gulp": "^3",
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"typescript": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",
"watchify": "^3"
},
"dependencies": {
"chat": "link:../chat",
"chat": "2.0.0",
"chessground": "^7.2",
"common": "link:../common",
"game": "link:../game",
"common": "1.0.0",
"game": "1.0.0",
"snabbdom": "ornicar/snabbdom#lichess"
}
}

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
/// <reference types="types/lichess-jquery" />
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode'
import klass from 'snabbdom/modules/class';

View File

@ -1,4 +1,3 @@
/// <reference types="types/lichess" />
import { h } from 'snabbdom'
import * as created from './created';
import * as started from './started';

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@
"gulp-uglify": "^3",
"gulp-util": "^3",
"tsify": "^3",
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2",
"vinyl-buffer": "^1",
"vinyl-source-stream": "^1",

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
import view from './view';
import { init } from 'snabbdom';

File diff suppressed because it is too large Load Diff

View File

@ -22,10 +22,10 @@
"compile": "tsc"
},
"devDependencies": {
"types": "link:../types",
"@types/lichess": "1.0.0",
"typescript": "^2"
},
"dependencies": {
"common": "link:../common"
"common": "1.0.0"
}
}

View File

@ -1,5 +1,3 @@
/// <reference types="types/lichess" />
import { build, TreeWrapper } from './tree';
import * as path from './path';
import * as ops from './ops';

View File

@ -1,15 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"common@link:../common":
version "0.0.0"
uid ""
"types@link:../types":
version "0.0.0"
uid ""
typescript@^2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"

4109
yarn.lock

File diff suppressed because it is too large Load Diff