Skip to content

Commit 488da53

Browse files
committed
Move public to literki project
1 parent 4f3a2ec commit 488da53

File tree

188 files changed

+3005784
-834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+3005784
-834
lines changed

.vs/config/applicationhost.config

+1,038
Large diffs are not rendered by default.

Literki./.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.js
2+
*.js.map
3+
node_modules
4+
*.html

Literki./.vscode/settings.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.exclude": {
4+
"**/.git": true,
5+
"**/.DS_Store": true,
6+
"**/*.js": { "when": "$(basename).ts"},
7+
"**/*.js.map": true
8+
}
9+
}

Literki./.vscode/tasks.json

+190
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
// Available variables which can be used inside of strings.
2+
// ${workspaceRoot}: the root folder of the team
3+
// ${file}: the current opened file
4+
// ${fileBasename}: the current opened file's basename
5+
// ${fileDirname}: the current opened file's dirname
6+
// ${fileExtname}: the current opened file's extension
7+
// ${cwd}: the current working directory of the spawned process
8+
9+
// A task runner that calls the Typescript compiler (tsc) and
10+
// Compiles a HelloWorld.ts program
11+
{
12+
"version": "0.1.0",
13+
14+
// The command is tsc. Assumes that tsc has been installed using npm install -g typescript
15+
"command": "tsc",
16+
17+
// The command is a shell script
18+
"isShellCommand": true,
19+
20+
// Show the output window only if unrecognized errors occur.
21+
"showOutput": "silent",
22+
23+
// args is the HelloWorld program to compile.
24+
"args": [],
25+
26+
// use the standard tsc problem matcher to find compile problems
27+
// in the output.
28+
"problemMatcher": "$tsc"
29+
}
30+
31+
// A task runner that calls the Typescript compiler (tsc) and
32+
// compiles based on a tsconfig.json file that is present in
33+
// the root of the folder open in VSCode
34+
/*
35+
{
36+
"version": "0.1.0",
37+
38+
// The command is tsc. Assumes that tsc has been installed using npm install -g typescript
39+
"command": "tsc",
40+
41+
// The command is a shell script
42+
"isShellCommand": true,
43+
44+
// Show the output window only if unrecognized errors occur.
45+
"showOutput": "silent",
46+
47+
// Tell the tsc compiler to use the tsconfig.json from the open folder.
48+
"args": ["-p", "."],
49+
50+
// use the standard tsc problem matcher to find compile problems
51+
// in the output.
52+
"problemMatcher": "$tsc"
53+
}
54+
*/
55+
56+
// A task runner configuration for gulp. Gulp provides a less task
57+
// which compiles less to css.
58+
/*
59+
{
60+
"version": "0.1.0",
61+
"command": "gulp",
62+
"isShellCommand": true,
63+
"tasks": [
64+
{
65+
"taskName": "less",
66+
// Make this the default build command.
67+
"isBuildCommand": true,
68+
// Show the output window only if unrecognized errors occur.
69+
"showOutput": "silent",
70+
// Use the standard less compilation problem matcher.
71+
"problemMatcher": "$lessCompile"
72+
}
73+
]
74+
}
75+
*/
76+
77+
// Uncomment the following section to use jake to build a workspace
78+
// cloned from https://github.com/Microsoft/TypeScript.git
79+
/*
80+
{
81+
"version": "0.1.0",
82+
// Task runner is jake
83+
"command": "jake",
84+
// Need to be executed in shell / cmd
85+
"isShellCommand": true,
86+
"showOutput": "silent",
87+
"tasks": [
88+
{
89+
// TS build command is local.
90+
"taskName": "local",
91+
// Make this the default build command.
92+
"isBuildCommand": true,
93+
// Show the output window only if unrecognized errors occur.
94+
"showOutput": "silent",
95+
// Use the redefined Typescript output problem matcher.
96+
"problemMatcher": [
97+
"$tsc"
98+
]
99+
}
100+
]
101+
}
102+
*/
103+
104+
// Uncomment the section below to use msbuild and generate problems
105+
// for csc, cpp, tsc and vb. The configuration assumes that msbuild
106+
// is available on the path and a solution file exists in the
107+
// workspace folder root.
108+
/*
109+
{
110+
"version": "0.1.0",
111+
"command": "msbuild",
112+
"args": [
113+
// Ask msbuild to generate full paths for file names.
114+
"/property:GenerateFullPaths=true"
115+
],
116+
"taskSelector": "/t:",
117+
"showOutput": "silent",
118+
"tasks": [
119+
{
120+
"taskName": "build",
121+
// Show the output window only if unrecognized errors occur.
122+
"showOutput": "silent",
123+
// Use the standard MS compiler pattern to detect errors, warnings
124+
// and infos in the output.
125+
"problemMatcher": "$msCompile"
126+
}
127+
]
128+
}
129+
*/
130+
131+
// Uncomment the following section to use msbuild which compiles Typescript
132+
// and less files.
133+
/*
134+
{
135+
"version": "0.1.0",
136+
"command": "msbuild",
137+
"args": [
138+
// Ask msbuild to generate full paths for file names.
139+
"/property:GenerateFullPaths=true"
140+
],
141+
"taskSelector": "/t:",
142+
"showOutput": "silent",
143+
"tasks": [
144+
{
145+
"taskName": "build",
146+
// Show the output window only if unrecognized errors occur.
147+
"showOutput": "silent",
148+
// Use the standard MS compiler pattern to detect errors, warnings
149+
// and infos in the output.
150+
"problemMatcher": [
151+
"$msCompile",
152+
"$lessCompile"
153+
]
154+
}
155+
]
156+
}
157+
*/
158+
// A task runner example that defines a problemMatcher inline instead of using
159+
// a predefined one.
160+
/*
161+
{
162+
"version": "0.1.0",
163+
"command": "tsc",
164+
"isShellCommand": true,
165+
"args": ["HelloWorld.ts"],
166+
"showOutput": "silent",
167+
"problemMatcher": {
168+
// The problem is owned by the typescript language service. Ensure that the problems
169+
// are merged with problems produced by Visual Studio's language service.
170+
"owner": "typescript",
171+
// The file name for reported problems is relative to the current working directory.
172+
"fileLocation": ["relative", "${cwd}"],
173+
// The actual pattern to match problems in the output.
174+
"pattern": {
175+
// The regular expression. Matches HelloWorld.ts(2,10): error TS2339: Property 'logg' does not exist on type 'Console'.
176+
"regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",
177+
// The match group that denotes the file containing the problem.
178+
"file": 1,
179+
// The match group that denotes the problem location.
180+
"location": 2,
181+
// The match group that denotes the problem's severity. Can be omitted.
182+
"severity": 3,
183+
// The match group that denotes the problem code. Can be omitted.
184+
"code": 4,
185+
// The match group that denotes the problem's message.
186+
"message": 5
187+
}
188+
}
189+
}
190+
*/

Literki./README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Server
2+
3+

Literki./app.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import server = require('./server');
2+
console.log(process.version);
3+
server.start();

Literki./config/default.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"Passport": {
3+
"strategy": "Google"
4+
},
5+
6+
"GoogleAuthorization": {
7+
"clientID": "699211361113-d9vb6n790bruvrdlv1thsg9t3grkn8ff.apps.googleusercontent.com",
8+
"clientSecret": "0-e8BKz53dNr9QjBiVWgS1_g",
9+
"callbackURL": "http://localhost:1337/auth/google/return"
10+
},
11+
12+
"MongoDb": {
13+
"uri": "mongodb://localhost/literki"
14+
},
15+
16+
"Server": {
17+
"port" : "1337"
18+
}
19+
20+
}

Literki./config/production.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"Passport": {
3+
"strategy": "Google"
4+
},
5+
6+
"GoogleAuthorization": {
7+
"clientID": "699211361113-6b5hmrk8169iipecd81tpq9it0s0aim4.apps.googleusercontent.com",
8+
"clientSecret": "Lc6wOH0NjHGYRw5KgJfxftQr",
9+
"callbackURL": "http://kosmos.cloudapp.net/auth/google/return"
10+
},
11+
12+
"MongoDb": {
13+
"uri": "mongodb://localhost/literki"
14+
}
15+
}

Literki./config/test.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"Passport": {
3+
"strategy": "Http"
4+
},
5+
6+
"MongoDb": {
7+
"uri": "mongodb://localhost/literki-test"
8+
},
9+
10+
"Server": {
11+
"port" : "1338"
12+
}
13+
}

Literki./gulpfile.ts

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
///<reference path="typings/tsd.d.ts"/>
2+
3+
import gulp = require('gulp');
4+
import tsc = require('gulp-typescript');
5+
6+
gulp.task('tsc-server', () => {
7+
gulp.src('./scripts/**/*.ts')
8+
.pipe(tsc({
9+
module: "commonjs"
10+
}))
11+
.pipe(gulp.dest('./scripts/'));
12+
});
13+
14+
gulp.task('tsc-browser-shared', () => {
15+
gulp.src('./scripts/shared/**/*.ts')
16+
.pipe(tsc({
17+
module: "amd"
18+
}))
19+
.pipe(gulp.dest('./public/scripts/shared/'));
20+
});
21+
22+
gulp.task('tsc-browser', () => {
23+
gulp.src('./public/scripts/**/*.ts')
24+
.pipe(tsc({
25+
module: "amd"
26+
}))
27+
.pipe(gulp.dest('./public/scripts/'));
28+
});
29+
30+
gulp.task('default', ['tsc-server', 'tsc-browser-shared','tsc-browser']);

Literki./package.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "literki",
3+
"version": "0.1.0",
4+
"description": "literki",
5+
"main": "app.js",
6+
"author": {
7+
"name": "Krzys",
8+
"email": "krzys@kosmos.org"
9+
},
10+
"scripts": {
11+
"test": "echo \"Error: no test specified\" && exit 1",
12+
"postinstall": "tsc && gulp",
13+
"start": "node app.js"
14+
},
15+
"dependencies": {
16+
"async": "^1.5.0",
17+
"body-parser": "^1.12.4",
18+
"browserify": "^13.0.0",
19+
"config": "^1.14.0",
20+
"cookie-parser": "^1.3.5",
21+
"express": "^4.12.4",
22+
"express-session": "^1.11.3",
23+
"gulp": "^3.9.1",
24+
"gulp-typescript": "^2.12.1",
25+
"gulp-uglify": "^1.5.3",
26+
"i18next": "^1.10.4",
27+
"jade": "^1.11.0",
28+
"konva": "^0.11.1",
29+
"less-middleware": "^2.0.1",
30+
"mocha": "^2.4.5",
31+
"mongoose": "^4.2.9",
32+
"passport": "^0.2.2",
33+
"passport-google-openidconnect": "0.0.4",
34+
"passport-http": "^0.3.0",
35+
"request": "^2.61.0",
36+
"tough-cookie": "^2.0.0",
37+
"typescript": "^1.8.9",
38+
"underscore": "^1.8.3",
39+
"vinyl-transform": "^1.0.0",
40+
"winston": "^1.0.1"
41+
}
42+
}

Literki/public/board.ts Literki./public/scripts/board.ts

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
/// <reference path="../typings/kineticjs/kineticjs.d.ts"/>
2-
/// <reference path="../typings/jqueryui/jqueryui.d.ts" />
3-
/// <amd-dependency path="./scripts/jquery-ui" />
1+
/// <reference path="../../typings/tsd.d.ts"/>
2+
/// <amd-dependency path="/scripts/lib/jquery-ui.js" />
43

54
import master = require('./master');
6-
import literki = require('./scripts/literki');
7-
import System = require('./scripts/system');
5+
import literki = require('../../scripts/shared/literki');
86
import ko = require('knockout');
97
import $ = require('jquery');
10-
import Kinetic = require('Kinetic');
8+
import Kinetic = require('kinetic');
119

1210
class BoardLetterPosition {
1311
x: number;
@@ -431,7 +429,7 @@ class PlayerModel {
431429
refresh(player: literki.GamePlayer, currentPlayer: literki.IGamePlayer): void {
432430
this.playerName(player.playerName);
433431
this.points((<literki.GamePlayer>player).getPoints());
434-
this.remainingTime(System.formatSeconds(player.remainingTime, "mm:ss"));
432+
this.remainingTime(master.formatSeconds(player.remainingTime, "mm:ss"));
435433
this.isCurrentPlayer(player.userId == game.getCurrentPlayer().userId);
436434
this.isCurrentUser(player.userId == game.currentUserId);
437435
this.playerCss((this.isCurrentUser() ? "currentUser" : "player") + (!player.isAlive() ? " inactivePlayer" : ""));
@@ -568,8 +566,8 @@ class BoardController extends master.MasterControler<BoardModel> {
568566
}
569567

570568
init(): void {
571-
var gameId = System.urlParam("gameId");
572-
var join = System.urlParam("join");
569+
var gameId = master.urlParam("gameId");
570+
var join = master.urlParam("join");
573571

574572
if (join) {
575573
this.callGETMethod("/game/join", true, { gameId: gameId }, true );

Literki/public/main.ts Literki./public/scripts/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import master = require('./master');
2-
import literki = require('./scripts/literki');
2+
import literki = require('../../scripts/shared/literki');
33
import ko = require('knockout');
44
import $ = require('jquery');
55
import moment = require('moment');

0 commit comments

Comments
 (0)