From 31a5a99d0f7677018f535622b714cbde2338182f Mon Sep 17 00:00:00 2001
From: dutchie031 <54616262+dutchie031@users.noreply.github.com>
Date: Tue, 7 Apr 2026 22:40:54 +0200
Subject: [PATCH] wip
---
Readme.md | 49 +++++++++++++++++++
.../action.yml | 11 ++++-
.../esbuild.js | 0
.../package-lock.json | 0
.../package.json | 0
.../src/index.ts | 2 -
.../tsconfig.json | 0
7 files changed, 58 insertions(+), 4 deletions(-)
create mode 100644 Readme.md
rename {gh-scripting-compiler => github-action}/action.yml (69%)
rename {gh-scripting-compiler => github-action}/esbuild.js (100%)
rename {gh-scripting-compiler => github-action}/package-lock.json (100%)
rename {gh-scripting-compiler => github-action}/package.json (100%)
rename {gh-scripting-compiler => github-action}/src/index.ts (97%)
rename {gh-scripting-compiler => github-action}/tsconfig.json (100%)
diff --git a/Readme.md b/Readme.md
new file mode 100644
index 0000000..67c29c6
--- /dev/null
+++ b/Readme.md
@@ -0,0 +1,49 @@
+# Dutchies DCS Mission Scripting Tools
+
+This repository is what I see as useful tools for DCS mission scripting. It contains a VS Code extension for easy DCS mission scripting, a Github Action for automatically compiling your mission scripts.
+
+For me, I've used it in [Spearhead](https://github.com/dutchie031/Spearhead) and am using it for every script I write.
+
+## VS Code Extension
+
+### Features:
+
+Get the extension here: https://marketplace.visualstudio.com/items?itemName=dutchie031.dutchies-dcs-scripting-tools
+
+- [x] Syntax highlighting for DCS mission scripts
+- [ ] Code snippets for common DCS scripting patterns
+- [x] Compilation of mission scripts on save (or command)
+- [x] Additional dev script that can be used in DCS.
+ This way the compiled file will be reloaded on each mission restart.
+ Without having to re-import the script file into the mission.
+
+## Github Action
+
+### Features:
+
+- [x] Compile the mission script just like in the VS Code extension, but in a Github Action.
+
+### Usage:
+
+```yaml
+
+name: Compile Scripts
+on: [push]
+jobs:
+ compile:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dutchie031/DcsMissionScriptingTools/github-action@action/v1
+ with:
+ source-root: 'src'
+ output-file: 'output/compiled.lua'
+
+ - name: Upload Compiled Script
+ uses: actions/upload-artifact@v3
+ with:
+ name: compiled-script
+ path: output/compiled.lua
+
+
+```
\ No newline at end of file
diff --git a/gh-scripting-compiler/action.yml b/github-action/action.yml
similarity index 69%
rename from gh-scripting-compiler/action.yml
rename to github-action/action.yml
index 464042a..dc41e5c 100644
--- a/gh-scripting-compiler/action.yml
+++ b/github-action/action.yml
@@ -11,5 +11,12 @@ inputs:
default: 'output/compiled.lua'
runs:
- using: 'node20'
- main: 'dist/index.js'
+ using: 'composite'
+ steps:
+ - run: |
+ cd ${{ github.action_path }}
+ npm ci
+ npm run build
+ node dist/index.js
+ shell: bash
+
diff --git a/gh-scripting-compiler/esbuild.js b/github-action/esbuild.js
similarity index 100%
rename from gh-scripting-compiler/esbuild.js
rename to github-action/esbuild.js
diff --git a/gh-scripting-compiler/package-lock.json b/github-action/package-lock.json
similarity index 100%
rename from gh-scripting-compiler/package-lock.json
rename to github-action/package-lock.json
diff --git a/gh-scripting-compiler/package.json b/github-action/package.json
similarity index 100%
rename from gh-scripting-compiler/package.json
rename to github-action/package.json
diff --git a/gh-scripting-compiler/src/index.ts b/github-action/src/index.ts
similarity index 97%
rename from gh-scripting-compiler/src/index.ts
rename to github-action/src/index.ts
index 29c2019..9c47355 100644
--- a/gh-scripting-compiler/src/index.ts
+++ b/github-action/src/index.ts
@@ -1,5 +1,4 @@
import * as core from '@actions/core';
-import { execSync } from 'child_process';
import { ScriptCompiler, ScriptCompilerOptions, CompilationError, ICompilationLogger } from 'dcs-script-compiler';
class Logger implements ICompilationLogger {
@@ -16,7 +15,6 @@ class Logger implements ICompilationLogger {
}
}
-
async function run() {
try {
diff --git a/gh-scripting-compiler/tsconfig.json b/github-action/tsconfig.json
similarity index 100%
rename from gh-scripting-compiler/tsconfig.json
rename to github-action/tsconfig.json