visual-studio-codecompilationassetsapache-royale

sources assets files in js-debug missing with visual studio code on Apache Royale


I use visual studio code and setup it following theses instructions : https://github.com/apache/royale-asjs/wiki/Visual-Studio-Code

Everythings worked fine.

For now I deleted bin folder in main project, and when launch debug, then bin and js-debug and others stuffs are right generated, but my assets dir with used jpg are not copied.

For exemple in the code I use <j:Image src="assets/logo.png" percentHeight="100"/> but the is no assets/logo.png in js-debug. So I must copy it manualy...

Here is my asconfig.json :

{
    "compilerOptions": {
        "targets": [
            "JSRoyale"
        ],
        "theme": "${royalelib}/themes/JewelTheme/src/main/resources/defaults.css",
        //"html-template": "src/main/resources/jewel-example-index-template.html",
        "source-map": true,
        "source-path": [
            "src"
        ],
    },
    "files":
    [
        "src/main/royale/App.mxml"
    ]
}

and tasks.json:

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "actionscript",
            "clean": true,
            "problemMatcher": []
        },
        {
            "label": "build",
            "type": "actionscript",
            "debug": true,
            "problemMatcher": []
        }
    ]
}

Could someone tell me how to copy assets folder automatically ? thanks Regards


Solution

  • Add to your asconfig.json file:

        "copySourcePathAssets": true