merged main
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
.vscode/**
|
||||
.vscode-test/**
|
||||
out/**
|
||||
node_modules/**
|
||||
src/**
|
||||
.gitignore
|
||||
.yarnrc
|
||||
esbuild.js
|
||||
vsc-extension-quickstart.md
|
||||
**/tsconfig.json
|
||||
**/eslint.config.mjs
|
||||
**/*.map
|
||||
**/*.ts
|
||||
**/.vscode-test.*
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 dutchie031
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -5,6 +5,60 @@ Direct DCS API checking and a Transpiler that can help keep huge complex scripts
|
||||
|
||||
## Features
|
||||
|
||||
- DCS API checking in VSCode
|
||||
Automatic checking of your code for DCS API errors.
|
||||
- Transpiler
|
||||
A tool that can help you write more complex scripts in a more simple and overseeable way.
|
||||
Transpiles multiple files into a single file that can be used in DCS, using standard Lua syntax and features.
|
||||
|
||||
|
||||
## How To use
|
||||
|
||||
### Intellisense and API checking in VSCode.
|
||||
|
||||
1. Install the extension in VSCode.
|
||||
2. Open your workspace with your DCS mission scripts.
|
||||
3. Enable: `> Dutchies Scripting Tools: Enable`
|
||||
|
||||
### Transpiler
|
||||
|
||||
1. Make sure you have the code in `./src` folder by default, or change the `src` folder in the settings.
|
||||
`settings.json`:
|
||||
```json
|
||||
{
|
||||
"dutchiesScriptingTools.src": "./src"
|
||||
}
|
||||
```
|
||||
|
||||
2. Write your code in the `src` folder, with possible subfolders. You can use standard Lua syntax and features, and the transpiler will handle the rest.
|
||||
|
||||
NOTE:
|
||||
There's no implicit entry point. The whole code will be put into a single Lua file. <br>
|
||||
The order of the files depends on dependencies via the `require` function. So if you have a file `main.lua` that requires `utils.lua`, the transpiler will first transpile `utils.lua` and then `main.lua`. <br>
|
||||
This means that if you have code that executes on load, it will be executed. <br>
|
||||
Best practice is to have 1 file that executes and the rest be modules. <br>
|
||||
Eg. `main.lua`:
|
||||
```lua
|
||||
local utils = require("utils")
|
||||
|
||||
utils.printHelloWorld()
|
||||
|
||||
```
|
||||
And `utils.lua`:
|
||||
```lua
|
||||
local utils = {}
|
||||
utils.printHelloWorld = function()
|
||||
env.info("Hello World!")
|
||||
end
|
||||
return utils
|
||||
```
|
||||
|
||||
## Possible Future Features
|
||||
|
||||
- DCS Snippets
|
||||
A collection of useful code snippets for DCS scripting in VSCode.
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
`sumenko.lua` : The VSCode Lua Language Server
|
||||
@@ -20,5 +74,5 @@ Direct DCS API checking and a Transpiler that can help keep huge complex scripts
|
||||
### 0.0.1
|
||||
|
||||
Initial.
|
||||
Still very much in Test/Development
|
||||
Still very much in Test/Development. Use at your own risk.
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 234 KiB |
@@ -7,6 +7,11 @@
|
||||
"name": "dutchie031",
|
||||
"email": "54616262+dutchie031@users.noreply.github.com"
|
||||
},
|
||||
"icon": "dutchie2.png",
|
||||
"galleryBanner": {
|
||||
"color": "#222430",
|
||||
"theme": "dark"
|
||||
},
|
||||
"publisher": "dutchie031",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -96,14 +101,15 @@
|
||||
"sumneko.lua"
|
||||
],
|
||||
"files": [
|
||||
"dist",
|
||||
"dist/**",
|
||||
"README.md",
|
||||
"lua-addons/**/*",
|
||||
"syntaxes/**/*"
|
||||
"dutchie2.png",
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "npm run build -w compiler && npm run package",
|
||||
"vscode:prepublish": "npm run package",
|
||||
"compile": "npm run check-types && npm run lint && node esbuild.js",
|
||||
"watch": "npm-run-all -p watch:*",
|
||||
"watch:esbuild": "node esbuild.js --watch",
|
||||
|
||||
Reference in New Issue
Block a user