Skip to content

Commit df47945

Browse files
authored
Merge pull request #87 from hrueger/master
Frontend rewrite using Angular
2 parents 8d629c1 + 9cc134f commit df47945

File tree

174 files changed

+29774
-5046
lines changed

Some content is hidden

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

174 files changed

+29774
-5046
lines changed

Diff for: .github/workflows/build.yml

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build_cli:
7+
name: Build CLI on Ubuntu
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- name: Setup Node.js
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
- name: Install dependencies
16+
run: npm i
17+
- name: Build
18+
run: npm pack
19+
- name: NPM Publish
20+
if: startsWith(github.ref, 'refs/tags/v')
21+
uses: JS-DevTools/npm-publish@v1
22+
with:
23+
token: ${{ secrets.NPM_ACCESS_TOKEN }}
24+
## - uses: Saionaro/[email protected]
25+
## id: package-version
26+
## - name: Upload Artifact
27+
## uses: actions/upload-artifact@v2
28+
## with:
29+
## name: 'TallyArbiter-${{ steps.package-version.outputs.version }}'
30+
## path: 'TallyArbiter-${{ steps.package-version.outputs.version }}.tgz'
31+
32+
build_desktop:
33+
name: Build Desktop on ${{ matrix.os }}
34+
runs-on: ${{ matrix.os }}
35+
strategy:
36+
matrix:
37+
os: [windows-latest, ubuntu-latest, macos-latest]
38+
steps:
39+
- uses: actions/checkout@v1
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v1
42+
with:
43+
node-version: 12
44+
- name: Install dependencies
45+
run: npm i
46+
- name: Build
47+
uses: samuelmeuli/[email protected]
48+
with:
49+
github_token: ${{ secrets.github_token }}
50+
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
51+
skip_build: true
52+
## - name: Get current version
53+
## uses: Saionaro/[email protected]
54+
## id: package-version
55+
## - name: Upload Artifact
56+
## uses: actions/upload-artifact@v2
57+
## if: matrix.os == 'ubuntu-latest'
58+
## with:
59+
## name: 'TallyArbiter-${{ steps.package-version.outputs.version }}-Linux'
60+
## path: 'release/TallyArbiter-${{ steps.package-version.outputs.version }}.AppImage'
61+
## - name: Upload Artifact
62+
## uses: actions/upload-artifact@v2
63+
## if: matrix.os == 'macos-latest'
64+
## with:
65+
## name: 'TallyArbiter-${{ steps.package-version.outputs.version }}-MacOS'
66+
## path: 'release/TallyArbiter-${{ steps.package-version.outputs.version }}.dmg'
67+
## - name: Upload Artifact
68+
## uses: actions/upload-artifact@v2
69+
## if: matrix.os == 'windows-latest'
70+
## with:
71+
## name: 'TallyArbiter-${{ steps.package-version.outputs.version }}-Windows'
72+
## path: 'release/TallyArbiter Setup ${{ steps.package-version.outputs.version }}.exe'

Diff for: .github/workflows/docs.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
name: Deploy
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Install dependencies
15+
working-directory: docs
16+
run: npm i
17+
- name: Build docs
18+
working-directory: docs
19+
run: npm run build
20+
- name: Deploy
21+
uses: JamesIves/[email protected]
22+
with:
23+
BRANCH: gh-pages
24+
FOLDER: docs/build

Diff for: .gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,9 @@ dist
108108

109109
# Remove config.json from default repo
110110
config.json
111+
112+
# don't include the generated UI
113+
ui-dist/*
114+
115+
# don't include any installers
116+
release

Diff for: UI/.browserslistrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

Diff for: UI/.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

Diff for: UI/.gitignore

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
16+
# IDEs and editors
17+
/.idea
18+
.project
19+
.classpath
20+
.c9/
21+
*.launch
22+
.settings/
23+
*.sublime-workspace
24+
25+
# IDE - VSCode
26+
.vscode/*
27+
!.vscode/settings.json
28+
!.vscode/tasks.json
29+
!.vscode/launch.json
30+
!.vscode/extensions.json
31+
.history/*
32+
33+
# misc
34+
/.sass-cache
35+
/connect.lock
36+
/coverage
37+
/libpeerconnection.log
38+
npm-debug.log
39+
yarn-error.log
40+
testem.log
41+
/typings
42+
43+
# System Files
44+
.DS_Store
45+
Thumbs.db

Diff for: UI/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# TallyArbiterUI
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.1.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

Diff for: UI/angular.json

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"tallyarbiter-ui": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
},
12+
"@schematics/angular:application": {
13+
"strict": true
14+
}
15+
},
16+
"root": "",
17+
"sourceRoot": "src",
18+
"prefix": "app",
19+
"architect": {
20+
"build": {
21+
"builder": "@angular-devkit/build-angular:browser",
22+
"options": {
23+
"outputPath": "../ui-dist",
24+
"index": "src/index.html",
25+
"main": "src/main.ts",
26+
"polyfills": "src/polyfills.ts",
27+
"tsConfig": "tsconfig.app.json",
28+
"inlineStyleLanguage": "scss",
29+
"assets": [
30+
"src/favicon.png",
31+
"src/assets",
32+
"src/manifest.webmanifest"
33+
],
34+
"styles": [
35+
"src/styles.scss"
36+
],
37+
"scripts": [],
38+
"serviceWorker": true,
39+
"ngswConfigPath": "ngsw-config.json"
40+
},
41+
"configurations": {
42+
"production": {
43+
"budgets": [
44+
{
45+
"type": "initial",
46+
"maximumWarning": "500kb",
47+
"maximumError": "1mb"
48+
},
49+
{
50+
"type": "anyComponentStyle",
51+
"maximumWarning": "2kb",
52+
"maximumError": "4kb"
53+
}
54+
],
55+
"fileReplacements": [
56+
{
57+
"replace": "src/environments/environment.ts",
58+
"with": "src/environments/environment.prod.ts"
59+
}
60+
],
61+
"outputHashing": "all"
62+
},
63+
"development": {
64+
"buildOptimizer": false,
65+
"optimization": false,
66+
"vendorChunk": true,
67+
"extractLicenses": false,
68+
"sourceMap": true,
69+
"namedChunks": true
70+
}
71+
},
72+
"defaultConfiguration": "production"
73+
},
74+
"serve": {
75+
"builder": "@angular-devkit/build-angular:dev-server",
76+
"configurations": {
77+
"production": {
78+
"browserTarget": "tallyarbiter-ui:build:production",
79+
"proxyConfig": "src/proxy.conf.json"
80+
},
81+
"development": {
82+
"browserTarget": "tallyarbiter-ui:build:development",
83+
"proxyConfig": "src/proxy.conf.json"
84+
}
85+
},
86+
"defaultConfiguration": "development"
87+
},
88+
"extract-i18n": {
89+
"builder": "@angular-devkit/build-angular:extract-i18n",
90+
"options": {
91+
"browserTarget": "tallyarbiter-ui:build"
92+
}
93+
},
94+
"test": {
95+
"builder": "@angular-devkit/build-angular:karma",
96+
"options": {
97+
"main": "src/test.ts",
98+
"polyfills": "src/polyfills.ts",
99+
"tsConfig": "tsconfig.spec.json",
100+
"karmaConfig": "karma.conf.js",
101+
"inlineStyleLanguage": "scss",
102+
"assets": [
103+
"src/favicon.png",
104+
"src/assets",
105+
"src/manifest.webmanifest"
106+
],
107+
"styles": [
108+
"src/styles.scss"
109+
],
110+
"scripts": []
111+
}
112+
}
113+
}
114+
}
115+
},
116+
"defaultProject": "tallyarbiter-ui"
117+
}

Diff for: UI/karma.conf.js

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, './coverage/tallyarbiter-ui'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
34+
},
35+
reporters: ['progress', 'kjhtml'],
36+
port: 9876,
37+
colors: true,
38+
logLevel: config.LOG_INFO,
39+
autoWatch: true,
40+
browsers: ['Chrome'],
41+
singleRun: false,
42+
restartOnFileChange: true
43+
});
44+
};

0 commit comments

Comments
 (0)