Skip to content

VSCode/OWScript configuration JSON #15

Open
@MatthewSH

Description

@MatthewSH

You were discussing the compiling of a script via VSCode extension earlier. Why don't we take this a step further and implement an auto-compiler into the language itself with a configuration file.

The file can be defined in the root of the project and be something like owscript.config.json or something of the sort (a standard filename, like package.json and have a setup like:

{
    "name": "My Gamemode",
    "version": "1.0.0",
    "author": "John Doe",
    "website": "https://mywebsite.com",
    "git": {
        "repo": "https://github.com/johndoe/ow-gamemode",
        "issues": "https://github.com/johndoe/ow-gamemode/issues"
    },
    "compiler": {
        "bin": "path/to/OWScript",
        "input": "src/myscript.owpy",
        "output": "dist/myscript.ows",
        "options": {
            "generateAdapapCredit": true,
            "generateVersionRule": true,
            "generateCreditRule": true
        }
    },
    "cli": {
        "git": {
            "useHTTPS": false
        },
        "locations": {
            "modules":  "src/modules"
        }
    }
}

This is definitely, inspired, by NPM package file for sure. But this can give us a lot of flexibility in managing multiple projects and we can start standardizing a lot of the common functionality and make it easier to integrate git, generate standard rules for crediting author, showing version, etc. This could also integrate into the VSCode extension and utilize a submodule or an external path for the compiler (if defined).

EDIT: Forgot to add. Maybe on top of "OWScript" compiler we can write a "watcher" that will give us the ability to compile on file change, or something. Like my powershell file in my upgrade shop: https://github.com/overwatchworkshop/upgrade-shop/blob/master/watch.ps1

This watcher will utilize this configuration file so it makes development process easier and less to remember. Configure it once, and boom.

Metadata

Metadata

Assignees

Labels

extensionRelated to the VSCode extension for OWScript

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions