rokucommunity / roku-deploy

An npm module for zipping and deploying to Roku devices.
MIT License
41 stars 17 forks source link

roku-deploy does not respect bsconfig.json #103

Open iBicha opened 1 year ago

iBicha commented 1 year ago

My bsconfig.json looks like this

{
    "extends": "config/bsconfig.base.json",
   ...
}

But roku deploy does not seem to read from config/bsconfig.base.json

Making this fails (because it's looking in the wrong staging folder)

rokuDeploy.zipPackage({
    outDir: '.',
    outFile: zip_name
}).then(function(){
    console.log(`${zip_name} created`)
}, function(error) {
    console.error(error);
});
TwitchBronBron commented 1 year ago

Currently roku-deploy doesn't support the extends field in bsconfig.json.

https://github.com/rokucommunity/roku-deploy/blob/0858e5bdb7032399ee0c9f31ede70867cb32ce83/src/RokuDeploy.ts#L811

The best way to fix this would be to centralize the bsconfig.json loading logic so we can share it between roku-deploy and brighterscript, but another quicker option would be to just copy the bsconfig.json loading logic from brighterscript into roku-deploy.

iBicha commented 1 year ago

Would it be simpler to just call loadConfigFile https://github.com/rokucommunity/brighterscript/blob/06a53ed9381d0882765c34ef4c53435928e9d394/src/util.ts#L167

TwitchBronBron commented 1 year ago

That would end up with a weird circular dependency, because brighterscript depends on roku-deploy, and roku-deploy would then depend on brighterscript. npm might resolve them fine, but I think it would be better to keep the dependency one-way (brighterscript->roku-deploy).