From 88b67109da4bb8306b70d171a48b28b556e7ff1e Mon Sep 17 00:00:00 2001 From: cyberbit Date: Wed, 11 Oct 2023 18:11:58 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20autodiscover=20lua=20sources=20o?= =?UTF-8?q?n=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 3 +++ .vscode/tasks.json | 12 ++++++++++++ build.sh | 22 +--------------------- 3 files changed, 16 insertions(+), 21 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..52ab596 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "autobuild": true +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..c332d52 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,12 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "./build.sh" + } + ] +} \ No newline at end of file diff --git a/build.sh b/build.sh index b229b66..9bafdd1 100755 --- a/build.sh +++ b/build.sh @@ -3,27 +3,7 @@ mkdir -p dist rm -rf dist/* echo 'building...' -luacc telem.init -o dist/telem.lua -i src \ - telem.lib.Backplane \ - telem.lib.Metric \ - telem.lib.util \ - telem.lib.MetricCollection \ - telem.lib.ObjectModel \ - telem.lib.input.MEStorageInputAdapter \ - telem.lib.input.RefinedStorageInputAdapter \ - telem.lib.input \ - telem.lib.input.ItemStorageInputAdapter \ - telem.lib.input.mekanism.FissionReactorInputAdapter \ - telem.lib.input.mekanism.IndustrialTurbineInputAdapter \ - telem.lib.input.mekanism.InductionMatrixInputAdapter \ - telem.lib.input.mekanism.FusionReactorInputAdapter \ - telem.lib.input.FluidStorageInputAdapter \ - telem.lib.input.HelloWorldInputAdapter \ - telem.lib.output.HelloWorldOutputAdapter \ - telem.lib.output \ - telem.lib.output.GrafanaOutputAdapter \ - telem.lib.InputAdapter \ - telem.lib.OutputAdapter +luacc telem.init -o dist/telem.lua -i src $(for i in src/telem/lib/**/*.lua; do echo $i; done | sed 'y/\//./;s/^src.//;s/\.lua$//') echo 'squishing...' luamin -f dist/telem.lua > dist/telem.min.lua \ No newline at end of file