Skip to content

Commit c2d07ec

Browse files
committed
First commit
0 parents  commit c2d07ec

9 files changed

+965
-0
lines changed

.eslintrc.js

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
parserOptions: {
7+
ecmaVersion: 2020
8+
},
9+
parser: '@typescript-eslint/parser',
10+
plugins: [
11+
'@typescript-eslint',
12+
],
13+
extends: [
14+
'eslint:recommended',
15+
'plugin:@typescript-eslint/eslint-recommended',
16+
'plugin:@typescript-eslint/recommended',
17+
],
18+
rules: {
19+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
20+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
21+
semi: ['error', 'always'],
22+
'@typescript-eslint/no-non-null-assertion': 'off',
23+
// '@typescript-eslint/consistent-type-assertions': 'off',
24+
// '@typescript-eslint/no-explicit-any': 'off',
25+
'@typescript-eslint/no-empty-function': 'off',
26+
// '@typescript-eslint/no-unused-vars': 'off',
27+
// '@typescript-eslint/explicit-function-return-type': 'off',
28+
'@typescript-eslint/no-use-before-define': 'off',
29+
'@typescript-eslint/no-namespace': 'off',
30+
'no-inner-declarations': 'off',
31+
'no-return-assign': 'off',
32+
// 'no-fallthrough': 'off',
33+
quotes: 'off'
34+
}
35+
};

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
/dist

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
3+
node_js:
4+
- node

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 donkeytech
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# gaia-engine
2+
3+
Typescript engine for Take6, a game similar to 6nimmt.
4+
5+
## Setup
6+
7+
### Requirements
8+
9+
Recent version of node / yarn.
10+
11+
### Dependencies
12+
13+
In the project's folder:
14+
15+
```
16+
yarn
17+
```
18+
19+
### Build
20+
21+
To compile Typescript into javascript:
22+
23+
```
24+
yarn build
25+
```
26+
27+
### Test
28+
29+
```
30+
yarn test
31+
```
32+
33+
### Usage as a dependency from another module
34+
35+
If you want to use your local copy of this module instead of the npm version, as a dependency of
36+
another module, do this:
37+
38+
```
39+
## In this folder
40+
yarn link
41+
42+
## In the other project's folder
43+
yarn link take6-engine
44+
```

index.ts

Whitespace-only changes.

package.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "take6-engine",
3+
"version": "1.0.0",
4+
"description": "An engine for a game similar to 6nimmt",
5+
"main": "dist/index.js",
6+
"types": "index.ts",
7+
"source": "index.ts",
8+
"repository": "[email protected]:donkeytech/take6-engine.git",
9+
"publishConfig": {
10+
"access": "public"
11+
},
12+
"author": "coyotte508",
13+
"license": "MIT",
14+
"scripts": {
15+
"prepublishOnly": "npm run just-test && npm run clean && tsc",
16+
"postpublish": "npm run clean",
17+
"build": "npm run clean && tsc",
18+
"clean": "rm -Rf dist",
19+
"lint": "eslint . --ext .ts",
20+
"test": "npm run lint && npm run just-test",
21+
"just-test": "mocha -r ts-node/register src/**/*.spec.ts src/*.spec.ts"
22+
},
23+
"dependencies": {
24+
"boardgame.io": "^0.39.10",
25+
"seedrandom": "^3.0.5"
26+
},
27+
"devDependencies": {
28+
"@types/chai": "^4.1.2",
29+
"@types/lodash": "^4.14.149",
30+
"@types/mocha": "^2.2.48",
31+
"@types/node": "^13.11.0",
32+
"@types/seedrandom": "^2.4.27",
33+
"@typescript-eslint/eslint-plugin": "^2.31.0",
34+
"@typescript-eslint/parser": "^2.31.0",
35+
"chai": "^4.1.2",
36+
"eslint": "^6.8.0",
37+
"eslint-plugin-import": "^2.20.2",
38+
"eslint-plugin-node": "^11.1.0",
39+
"eslint-plugin-promise": "^4.2.1",
40+
"eslint-plugin-standard": "^4.0.1",
41+
"mocha": "^5.0.4",
42+
"ts-node": "^5.0.1",
43+
"typescript": "^3.8.3"
44+
}
45+
}

tsconfig.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"compilerOptions": {
3+
/* Basic Options */
4+
"target": "es2018",
5+
"module": "commonjs",
6+
"esModuleInterop": true,
7+
// "declaration": true, /* Generates corresponding '.d.ts' file. */
8+
"sourceMap": true, /* Generates corresponding '.map' file. */
9+
// "outFile": "./", /* Concatenate and emit output to single file. */
10+
"outDir": "./dist", /* Redirect output structure to the directory. */
11+
},
12+
"types": [
13+
"node"
14+
],
15+
"include": [
16+
"src/**/*.ts",
17+
"index.ts",
18+
"wrapper.ts"
19+
],
20+
"exclude": [
21+
"node_modules",
22+
"dist",
23+
"**/*.spec.ts"
24+
]
25+
}

0 commit comments

Comments
 (0)