diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ca7e486 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true +indent_size = 4 +indent_style = space +tab_width = 4 +end_of_line = lf + +[*.js] +indent_size = 2 +tab_width = 2 + +[{*.yaml,*.yml}] +indent_size = 2 +tab_width = 2 diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml new file mode 100644 index 0000000..0c5aad9 --- /dev/null +++ b/.github/workflows/distribute.yml @@ -0,0 +1,53 @@ +name: 'Build' +on: + pull_request: + push: + branches: + - main +jobs: + artifacts: + name : 'Create release' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # Create a zip from what's in this repo + - name: Archive Release + uses: thedoctor0/zip-release@0.7.5 + with: + type: 'zip' + directory: 'dist/' + path: '../' + filename: 'vmsacars_config.zip' + exclusions: '*.git* /*node_modules/* .editorconfig dist' + command: "mkdir -p dist" + + # List all the files that have been created + - name: 'List files' + run: | + find dist/ -maxdepth 2 -type f + + # You can uncomment the method you want to use to upload + # Create the environment variables appropriately to set it up + + # Upload via SFTP. See details here: + # https://github.com/marketplace/actions/sftp-uploader + + #- name: SFTP uploader + # uses: wangyucode/sftp-upload-action@v2.0.2 + # with: + # host: ${{ secrets.SFTP_HOST }} + # password: ${{ secrets.SFTP_PASSWORD }} + # localDir: 'dist' + # remoteDir: ${{ secrets.SFTP_REMOTE_PATH }} + + # Upload to an S3 bucket + # https://github.com/actions-marketplace-validations/shallwefootball_upload-s3-action + #- name: Upload S3 + # uses: shallwefootball/s3-upload-action@master + # with: + # aws_key_id: ${{ secrets.S3_BUILD_ARTIFACTS_ACCESS_KEY_ID }} + # aws_secret_access_key: ${{ secrets.S3_BUILD_ARTIFACTS_SECRET_ACCESS_KEY}} + # aws_bucket: ${{ secrets.S3_BUCKET_NAME }} + # source_dir: 'dist/' + # destination_dir: '' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d4e5d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,95 @@ +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea +*.iml + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix diff --git a/README.md b/README.md new file mode 100644 index 0000000..a3a84f3 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# vmsACARS Configuration Template + +--- + +## How to use this repo + +Create a fork/clone it, and customize it however you want. Also keep an eye on this repo +for updates/changes. For distribution, create a zip file, ensuring that the `manifest.json` +is at the root. You can then upload it, and set the config URL in vmsacars to the URL +of that zip file. A barebones GitHub actions workflow is provided to automate this process. + +### manifest.json + +The `manifest.json` file contains the locations of the particular items ACARS looks for: + + - `aircraft` - The aircraft config Javascript files are + - `rules` - The rules Javascript files are + - `scripts` - the callback scripts are + - `sounds` - Where the sound files are + +--- + +## Distributing + +### Using GitHub Actions + +GitHub actions is configured to create a zipfile of this repo and then upload it to a location of your choice. +You can uncomment the appropriate section from the `.github/workflows/distribute.yml` file, and add the variables. +The `secrets.XXX` line - the `XXX` key and value need to be added under `Settings -> Secrets and variables -> Actions` + +You're also not limited to the included actions, this is just a simple template. You can customize and enhance +it however you wish. + +### Uploading manually + +Create a zip file with all the contents of this directory. diff --git a/aircraft/empty b/aircraft/empty new file mode 100644 index 0000000..e69de29 diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..0791657 --- /dev/null +++ b/manifest.json @@ -0,0 +1,15 @@ +{ + "name": "default", + "aircraft": { + "path": "aircraft" + }, + "rules": { + "path": "rules" + }, + "scripts": { + "path": "sounds" + }, + "sounds": { + "path": "sounds" + } + } diff --git a/rules/empty b/rules/empty new file mode 100644 index 0000000..e69de29 diff --git a/scripts/empty b/scripts/empty new file mode 100644 index 0000000..e69de29 diff --git a/sounds/empty b/sounds/empty new file mode 100644 index 0000000..e69de29