Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode/OWScript configuration JSON #15

Open
MatthewSH opened this issue Jul 31, 2019 · 1 comment
Open

VSCode/OWScript configuration JSON #15

MatthewSH opened this issue Jul 31, 2019 · 1 comment
Assignees
Labels
extension Related to the VSCode extension for OWScript

Comments

@MatthewSH
Copy link
Contributor

MatthewSH commented Jul 31, 2019

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.

@adapap adapap added the extension Related to the VSCode extension for OWScript label Jul 31, 2019
@MatthewSH MatthewSH changed the title (Extension & Base) VSCode/OWScript configuration JSON VSCode/OWScript configuration JSON Aug 13, 2019
@MatthewSH
Copy link
Contributor Author

While adding this to node-OWScript I did find it pretty easy to do. I may break this out into it's own package however to allow us to use it in the extension branch as well as in my package. I'll generate any typings needed as well because, TypeScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension Related to the VSCode extension for OWScript
Projects
None yet
Development

No branches or pull requests

2 participants