XF 2.1 [SOLVED] External js file not included in release zip file

asprin

Active member
So I finally ran the php cmd.php xf-addon:build-release myAddon command. It executed successfully and installed as well.

The only thing is that in one of the templates, I was referencing a js file file which was placed in /js folder during development.

How would I go about including that file as part of the release pack? I read something about the build.json file but not able to find it anywhere.
 
Create a " build.json"

Code:
{
    "additional_files": [
        "js/demo/portal"
    ],
    "minify": [
        "js/demo/portal/a.js",
        "js/demo/portal/b.js"
    ],
    "rollup": {
        "js/demo/portal/ab-rollup.js": [
            "js/demo/portal/a.min.js",
            "js/demo/portal/b.min.js"
        ]
    },
    "exec": [
        "echo '{title} version {version_string} ({version_id}) has been built successfully!' > 'src/addons/Demo/Portal/_build/built.txt'"
    ]
}

 
So this file should reside in the addon's root folder? And after adding the file, I will require to run the build command again?

Sorry for the dumb questions....
 
Back
Top Bottom