Skip to content

Commit

Permalink
feat(score-keeper): Initial tablet app (#9)
Browse files Browse the repository at this point in the history
* nx migrate

* feat(score-keeper): initial nativescript setup for application

* feat: initial tablet app
  • Loading branch information
codephobia committed Apr 4, 2023
1 parent 4b0b5e4 commit 5d128d0
Show file tree
Hide file tree
Showing 176 changed files with 44,490 additions and 38,666 deletions.
8 changes: 5 additions & 3 deletions apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ COPY libs/go libs/go
COPY nx.json workspace.json tsconfig.base.json ./

# Build api app
RUN nx build api
# RUN nx build api
RUN go build -o dist/apps/api/api ./apps/api

# Build seed app
RUN nx build seed
# RUN nx build seed
RUN go build -o dist/apps/seed/seed ./apps/seed

# This is the stage where the final production image is built
FROM golang:1.14-alpine as final
FROM golang:1.20-alpine as final

# Set environment variables
ENV PORT=1268
Expand Down
17 changes: 0 additions & 17 deletions apps/dashboard/.browserslistrc

This file was deleted.

4 changes: 2 additions & 2 deletions apps/dashboard/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.15.0-alpine3.14
FROM node:18.14.0-alpine3.17

WORKDIR /workspace

Expand All @@ -8,7 +8,7 @@ ARG FONTAWESOME_NPM_AUTH_TOKEN
# Note: tsconfig.base.json holds paths for libs, so may want this being loaded
# via a volume instead.
COPY jest.config.ts \
jest.preset.ts \
jest.preset.js \
nx.json \
package-lock.json \
package.json \
Expand Down
5 changes: 3 additions & 2 deletions apps/dashboard/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
/* eslint-disable */
export default {
displayName: 'dashboard',

setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
Expand All @@ -18,5 +19,5 @@ module.exports = {
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
preset: '../../jest.preset.ts',
preset: '../../jest.preset.js',
};
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Component, Input, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
import { take, filter } from 'rxjs/operators';

import { GameType, IGame, OverlayState } from '@pool-overlay/models';
import { GameType, IGame, OverlayState, Direction } from '@pool-overlay/models';
import { ControllerStore } from './controller.store';
import { Direction } from '../../models/direction.model';
import { PlayerModalComponent, PlayerModalData } from '../player-modal/player-modal.component';
import { SocketService } from '@pool-overlay/scoreboard';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { concatMap, switchMap, tap, withLatestFrom } from 'rxjs/operators';

import { GameService } from '../../services/game.service';
import { OverlayStateService } from '../../services/overlay-state.service';
import { GameType, IGame, OverlayState } from '@pool-overlay/models';
import { Direction } from '../../models/direction.model';
import { GameType, IGame, OverlayState, Direction } from '@pool-overlay/models';

export interface ControllerState {
pending: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Inject, OnInit } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog';
import { PageEvent } from '@dashboard/components/pagination';
import { faXmark } from '@fortawesome/pro-regular-svg-icons';

Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/app/overlay/overlay.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { ReactiveFormsModule } from '@angular/forms';
import { MatDialogModule } from '@angular/material/dialog';
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

import { environment } from '../../environments/environment';
Expand Down
3 changes: 1 addition & 2 deletions apps/dashboard/src/app/overlay/services/game.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { HttpClient } from '@angular/common/http';
import { Inject, Injectable } from '@angular/core';

import { EnvironmentConfig, ENV_CONFIG } from '../../models/environment-config.model';
import { GameType, IGame } from '@pool-overlay/models';
import { Direction } from '../models/direction.model';
import { GameType, IGame, Direction } from '@pool-overlay/models';

@Injectable()
export class GameService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EventEmitter, Input, Output } from '@angular/core';
import { Component } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';

import { IPlayer } from '@pool-overlay/models';
import { ConfirmDialogComponent } from '../../../shared/components/confirm-dialog/confirm-dialog.component';
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/src/app/players/players.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { ReactiveFormsModule } from '@angular/forms';
import { MatDialogModule } from '@angular/material/dialog';
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';

import { SearchModule } from '@dashboard/components/search';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog';

import { IPlayer } from '@pool-overlay/models';

Expand Down
4 changes: 3 additions & 1 deletion apps/dashboard/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": []
"types": [],
"target": "ES2022",
"useDefineForClassFields": false
},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"],
Expand Down
47 changes: 24 additions & 23 deletions apps/dashboard/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./tsconfig.editor.json"
}
],
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"target": "es2020"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./tsconfig.editor.json"
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
],
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
18 changes: 0 additions & 18 deletions apps/overlay/.browserslistrc

This file was deleted.

6 changes: 3 additions & 3 deletions apps/overlay/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM node:16.15.0-alpine3.14
FROM node:18.14.0-alpine3.17

WORKDIR /workspace

# Build argument for fontawesome npm token
ARG FONTAWESOME_NPM_AUTH_TOKEN

COPY jest.config.ts \
jest.preset.ts \
jest.preset.js \
nx.json \
package-lock.json \
package.json \
Expand All @@ -16,4 +16,4 @@ COPY jest.config.ts \
.npmrc \
/workspace/

RUN npm install
RUN npm ci
5 changes: 3 additions & 2 deletions apps/overlay/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
/* eslint-disable */
export default {
displayName: 'overlay',

setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
Expand All @@ -19,5 +20,5 @@ module.exports = {
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
},
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
preset: '../../jest.preset.ts',
preset: '../../jest.preset.js',
};
4 changes: 3 additions & 1 deletion apps/overlay/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": []
"types": [],
"target": "ES2022",
"useDefineForClassFields": false
},
"files": ["src/main.ts", "src/polyfills.ts"],
"exclude": ["jest.config.ts"]
Expand Down
5 changes: 4 additions & 1 deletion apps/overlay/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
{
"path": "./tsconfig.editor.json"
}
]
],
"compilerOptions": {
"target": "es2020"
}
}
1 change: 1 addition & 0 deletions apps/score-keeper-nativescript/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": "../../.eslintrc.json", "ignorePatterns": ["!**/*", "references.d.ts", "node_modules/**/*", "hooks/**/*", "platforms/**/*"], "rules": {} }
41 changes: 41 additions & 0 deletions apps/score-keeper-nativescript/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# NativeScript
hooks/
node_modules/
platforms/

# NativeScript Template
*.js.map
*.js
!ngcc.config.js
!webpack.config.js
!jest.config.js
*.css

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# General
.DS_Store
.AppleDouble
.LSOverride
.idea
.cloud
.project
tmp/
typings/

# misc
npm-debug.log

# app
!*.d.ts
/report/
.nsbuildinfo
/temp/

package-lock.json
!tools/**
25 changes: 25 additions & 0 deletions apps/score-keeper-nativescript/App_Resources/Android/app.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// You can add your native dependencies here
dependencies {
// implementation 'androidx.multidex:multidex:2.0.1'
}

android {
// compileSdkVersion 32
// buildToolsVersion "32.0.0"
// ndkVersion ""

defaultConfig {
minSdkVersion 21
// targetSdkVersion 32

// Version Information
versionCode 1
versionName "1.0.0"

generatedDensities = []
}

aaptOptions {
additionalParameters "--no-version-vectors"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// this configurations is loaded before building plugins, as well as before building
// the app - this is where you can apply global settings and overrides

project.ext {
// androidXAppCompat = "1.4.1"
// androidXExifInterface = "1.3.3"
// androidXFragment = "1.4.1"
// androidXMaterial = "1.5.0"
// androidXMultidex = "2.0.1"
// androidXTransition = "1.4.1"
// androidXViewPager = "1.0.0"

// useKotlin = true
// kotlinVersion = "1.6.0"
}
Loading

0 comments on commit 5d128d0

Please sign in to comment.