Skip to content

Commit

Permalink
first
Browse files Browse the repository at this point in the history
  • Loading branch information
daysgobye committed Apr 20, 2024
1 parent abcf3b9 commit 356af31
Show file tree
Hide file tree
Showing 75 changed files with 5,716 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
plugins
28 changes: 28 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"rules": {
"@typescript-eslint/strict-boolean-expressions": [
"error",
{
"allowString": false,
"allowNumber": false
}
],
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/semi": 0,
"semi": 0,
"no-empty": false
}
}
45 changes: 45 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Defold Protocol Buffer Text Files (https://github.com/github/linguist/issues/5091)
*.animationset linguist-language=JSON5
*.atlas linguist-language=JSON5
*.camera linguist-language=JSON5
*.collection linguist-language=JSON5
*.collectionfactory linguist-language=JSON5
*.collectionproxy linguist-language=JSON5
*.collisionobject linguist-language=JSON5
*.cubemap linguist-language=JSON5
*.display_profiles linguist-language=JSON5
*.factory linguist-language=JSON5
*.font linguist-language=JSON5
*.gamepads linguist-language=JSON5
*.go linguist-language=JSON5
*.gui linguist-language=JSON5
*.input_binding linguist-language=JSON5
*.label linguist-language=JSON5
*.material linguist-language=JSON5
*.mesh linguist-language=JSON5
*.model linguist-language=JSON5
*.particlefx linguist-language=JSON5
*.render linguist-language=JSON5
*.sound linguist-language=JSON5
*.sprite linguist-language=JSON5
*.spinemodel linguist-language=JSON5
*.spinescene linguist-language=JSON5
*.texture_profiles linguist-language=JSON5
*.tilemap linguist-language=JSON5
*.tilesource linguist-language=JSON5

# Defold JSON Files
*.buffer linguist-language=JSON

# Defold GLSL Shaders
*.fp linguist-language=GLSL
*.vp linguist-language=GLSL

# Defold Lua Files
*.editor_script linguist-language=Lua
*.render_script linguist-language=Lua
*.script linguist-language=Lua
*.gui_script linguist-language=Lua

# Defold Project Settings
*.project linguist-language=INI
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-name: "@ts-defold*"

42 changes: 42 additions & 0 deletions .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: android_build_CD

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2.1.2
with:
node-version: 16.x

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Defold
uses: dapetcu21/setup-defold@v3.0.2

- name: Install Dependencies
run: npm install

- name: Genrate lua w/ ts-defold
run: npm run build&&npm run setmain

- name: Build
run: 'java -jar $BOB --root ./app --archive --platform armv7-android --bundle-output ./build --verbose resolve distclean build bundle'
- name: Archive build results
uses: actions/upload-artifact@v4
with:
name: android_build
path: ./build


49 changes: 49 additions & 0 deletions .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ios_build_CD

on:
push:
branches:
- main

jobs:
build:

runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: installcert
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: 'base 64 of your cert file'
p12-password: '1234'

- name: Setup Node
uses: actions/setup-node@v2.1.2
with:
node-version: 16.x

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Defold
run: wget "https://github.com/defold/defold/releases/download/1.7.0/bob.jar" && chmod 777 ./bob.jar

- name: Install Dependencies
run: npm install

- name: Genrate lua w/ ts-defold
run: npm run build&&npm run setmain
- name: Build
# You need to have the testflight.mobileprovision in your app dir
run: 'java -jar ../bob.jar --root ./app --archive --platform arm64-ios --bundle-output ./build --identity "Apple Distribution: you key name here" --mp app/testflight.mobileprovision --verbose resolve distclean build bundle'
- name: Archive build results
uses: actions/upload-artifact@v4
with:
name: ios_build
path: game_client/build

39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: ci_tests

on: [push]

jobs:
test:

runs-on: ubuntu-latest
timeout-minutes: 5


steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2.1.2
with:
node-version: 16.x

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Defold
uses: dapetcu21/setup-defold@v3.0.2

- name: Install Dependencies
run: npm install

- name: Genrate lua w/ ts-defold
run: npm run setupTests&&npm run resolve&&npm run build

- name: test
run: 'cd app&&java -jar $BOB --variant=debug resolve distclean build && dmengine_headless'


47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Logs
logs
*.log
npm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Dependency directories
node_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Generated
app/modules/
app/scripts/
app/lualib_bundle.lua
!src/**

# OS
.DS_Store
Thumbs.db

# Defold
app/.internal
app/build
.externalToolBuilders
.lock-wscript
*.pyc
app/builtins
dmengine*
app/liveupdate.settings

app/code/**/*.lua
app/code/**/*.lua.map
app/code/**/*.luac
app/code/**/*.script
app/code/**/*.script.map
app/code/**/*.gui_script
app/code/**/*.gui_script.map
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"tomblind.local-lua-debugger-vscode",
"typescript-to-lua.vscode-typescript-to-lua",
"dbaeumer.vscode-eslint",
"thejustinwalsh.textproto-grammer",
"ts-defold.defold-vscode-build",
],
}
30 changes: 30 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "lua-local",
"request": "launch",
"stopOnEntry": false,
"verbose": false,
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "build",
"program": {
"command": "${workspaceFolder}/app/build/default/dmengine",
},
"args": ["${workspaceFolder}/app/build/default/game.projectc"],
"windows": {
"program": { "command": "${workspaceFolder}/app/build/default/dmengine.exe" }
},
"scriptRoots": [
"app",
"src"
],
"scriptFiles": [
"app/**/*.lua",
"app/**/*.script",
"app/**/*.gui_script"
]
}
]
}
44 changes: 44 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"files.associations": {
"*.script": "lua",
"*.gui_script": "lua",
"*.render_script": "lua",
"*.editor_script": "lua",
"*.lua_": "lua",
"*.fp": "glsl",
"*.vp": "glsl",
"*.go": "textproto",
"*.animationset": "textproto",
"*.atlas": "textproto",
"*.buffer": "json",
"*.camera": "textproto",
"*.collection": "textproto",
"*.collectionfactory": "textproto",
"*.collectionproxy": "textproto",
"*.collisionobject": "textproto",
"*.display_profiles": "textproto",
"*.factory": "textproto",
"*.gamepads": "textproto",
"*.gui": "textproto",
"*.input_binding": "textproto",
"*.label": "textproto",
"*.material": "textproto",
"*.mesh": "textproto",
"*.model": "textproto",
"*.particlefx": "textproto",
"*.project": "ini",
"*.render": "textproto",
"*.sound": "textproto",
"*.spinemodel": "textproto",
"*.spinescene": "textproto",
"*.sprite": "textproto",
"*.texture_profiles": "textproto",
"*.tilemap": "textproto",
"*.tilesource": "textproto",
},
"files.exclude": {
"node_modules/": true,
"patches/": true,
},
"typescript.tsdk": "node_modules\\typescript\\lib"
}
Loading

0 comments on commit 356af31

Please sign in to comment.