diff --git a/.editorconfig b/.editorconfig index 1eb1009..8ab447a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,7 +4,7 @@ root = true [*] charset = utf-8 indent_style = space -indent_size = 4 +indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true diff --git a/gulp b/gulp deleted file mode 120000 index b356e5e..0000000 --- a/gulp +++ /dev/null @@ -1 +0,0 @@ -node_modules/.bin/gulp \ No newline at end of file diff --git a/hxformat.json b/hxformat.json new file mode 100644 index 0000000..7bf0a43 --- /dev/null +++ b/hxformat.json @@ -0,0 +1,5 @@ +{ + "indentation": { + "character": " " + } +} diff --git a/package.json b/package.json index ffb9fb1..62ac6f3 100755 --- a/package.json +++ b/package.json @@ -1,24 +1,25 @@ { - "name": "tankz", - "version": "0.17.6", - "private": true, - "devDependencies": { - "dateformat": "^3.0.3", - "gulp": "^4.0.0", - "gulp-add": "0.0.2", - "gulp-clean": "^0.4.0", - "gulp-haxetool": "^0.1.9", - "yargs": "^13.2.4" - }, - "haxeDependencies": { - "haxework": "1.3.0", - "lime": "8.0.0", - "openfl": "9.2.0", - "hxcpp": "4.2.1", - "protohx": "0.4.6", - "orm": "2.1.0", - "haxe-crypto": "0.0.8", - "svg": "1.1.3" - }, - "haxe": "4.2.5" + "name": "tankz", + "version": "0.17.6", + "private": true, + "devDependencies": { + "dateformat": "^3.0.3", + "gulp": "^4.0.0", + "gulp-add": "0.0.2", + "gulp-clean": "^0.4.0", + "gulp-haxetool": "^0.1.9", + "yargs": "^13.2.4" + }, + "haxeDependencies": { + "haxework": "1.3.0", + "lime": "8.0.0", + "openfl": "9.2.0", + "hxcpp": "4.2.1", + "protohx": "0.4.6", + "orm": "2.1.0", + "haxe-crypto": "0.0.8", + "svg": "1.1.3", + "formatter": "1.16.0" + }, + "haxe": "4.2.5" } diff --git a/scripts/format b/scripts/format new file mode 100755 index 0000000..f9b784b --- /dev/null +++ b/scripts/format @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -e +cd "$(dirname $(dirname "$0"))" || exit + +source $NEKO_SDK/activate +source $HAXE_SDK/activate +haxelib install formatter +haxelib run formatter \ + -s ./src/common/haxe \ + -s ./src/client/haxe \ + -s ./src/server/haxe \ + -s ./src/editor/haxe diff --git a/scripts/lint b/scripts/lint new file mode 100755 index 0000000..3cc9a77 --- /dev/null +++ b/scripts/lint @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -e +cd "$(dirname $(dirname "$0"))" || exit + +source $NEKO_SDK/activate +source $HAXE_SDK/activate +haxelib install formatter +haxelib run formatter \ + --check \ + -s ./src/common/haxe \ + -s ./src/client/haxe \ + -s ./src/server/haxe \ + -s ./src/editor/haxe diff --git a/scripts/setup b/scripts/setup new file mode 100755 index 0000000..c1b24e8 --- /dev/null +++ b/scripts/setup @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e +cd "$(dirname $(dirname "$0"))" || exit + +npm ci \ No newline at end of file diff --git a/tankz.code-workspace b/tankz.code-workspace new file mode 100644 index 0000000..f5ff926 --- /dev/null +++ b/tankz.code-workspace @@ -0,0 +1,46 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "haxe.executable": { + "path": "/home/shmyga/sdk/haxe/4.2.5/haxe", + "env": { + "HAXE_STD_PATH": "/home/shmyga/sdk/haxe/4.2.5/std" + } + }, + "haxe.configurations": [["build/app/flash/haxe/debug.hxml"]], + "haxe.displayServer": { + "arguments": [ + //"-v" + ] + } + }, + "extensions": { + "recommendations": ["nadako.vshaxe"] + }, + "launch": { + "version": "0.2.0", + "configurations": [ + { + "args": ["app:flash:test"], + "name": "app:flash:test", + "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", + "request": "launch", + "skipFiles": ["/**"], + "type": "node" + }, + { + "args": ["server:cpp:test"], + "name": "server:cpp:test", + "program": "${workspaceFolder}/node_modules/gulp/bin/gulp.js", + "request": "launch", + "skipFiles": ["/**"], + "type": "node" + } + ], + "compounds": [] + } +}