-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b787882
commit 480b261
Showing
6 changed files
with
2,196 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Deploys to NPM | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
- run: yarn install | ||
- run: yarn lint | ||
- run: yarn build | ||
- run: yarn semantic-release | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { MatchScore, SkillsScore } from '@18x18az/maestro-interfaces' | ||
|
||
interface MatchResults { | ||
redScore: number | ||
blueScore: number | ||
} | ||
|
||
export function calculateAllianceScore (): number { | ||
return 1 | ||
} | ||
|
||
export function calculateMatchScore (score: MatchScore): MatchResults { | ||
const redScore = calculateAllianceScore() | ||
const blueScore = calculateAllianceScore() | ||
|
||
return { redScore, blueScore } | ||
} | ||
|
||
export function calculateSkillsScore (score: SkillsScore): number { | ||
return 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "@18x18az/abacus", | ||
"version": "0.0.0", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"repository": "https://github.com/18x18az/abacus", | ||
"author": "Alec Miller <alecmichaelmiller@gmail.com>", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "rimraf dist && tsc", | ||
"lint": "ts-standard", | ||
"prepare": "husky install", | ||
"semantic-release": "semantic-release --branches main" | ||
}, | ||
"files": [ | ||
"dist/**" | ||
], | ||
"devDependencies": { | ||
"@types/node": "^20.5.0", | ||
"husky": "^8.0.3", | ||
"ts-standard": "^12.0.2", | ||
"typescript": "^5.1.6" | ||
}, | ||
"dependencies": { | ||
"@18x18az/maestro-interfaces": "^1.5.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"declaration": true, | ||
"removeComments": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"sourceMap": true, | ||
"allowJs": true, | ||
"resolveJsonModule": true, | ||
"incremental": true, | ||
"noImplicitAny": false, | ||
"noLib": false, | ||
"target": "es6", | ||
"outDir": "./dist", | ||
"skipLibCheck": true, | ||
"baseUrl": "./lib", | ||
"strictNullChecks": true | ||
} | ||
} |
Oops, something went wrong.