BowlerHatLLC / asconfigc

Command line utility that builds ActionScript projects configured with an asconfig.json file.
https://www.npmjs.com/package/asconfigc
Apache License 2.0
18 stars 5 forks source link

Override output from command line #21

Closed vrokolos closed 4 years ago

vrokolos commented 5 years ago

Can we have an -output switch so that it ignores the one from asconfig.json and uses this instead?

joshtynjala commented 4 years ago

I took a different approach, but this is now supported.

The new extends field in asconfig.json allows you to reference a base asconfig file and override anything that you want.

asconfig.json

{
    "compilerOptions": {
        "output": "bin/MyProject.swf"
    },
    "files": [
        "src/MyProject.as"
    ]
}

asconfig.custom.json

{
    "extends": "asconfig.json",
    "compilerOptions": {
        "output": "bin/Custom.swf"
    }
}

You can replace the middle section of the file name with anything. It has to start with asconfig. and end with .json.

Command line usage:

asconfigc --project asconfig.custom.json

In VSCode, all asconfig.*json files are detected in the workspace root, and they are each given their own set of build tasks.