Closed dewiweb closed 5 months ago
We have https://github.com/bitfocus/companion-module-template-js for common Javascript and https://github.com/bitfocus/companion-module-template-ts for typescript.
Naturally there are many modules in the wild using different variations. It depends heavily on the developer and on the needs of the module if you e.g. want to externalise some functions to different files or keep it all together. So the template shows both possibilities.
Is this a feature relevant to companion itself, and not a module?
Is there an existing issue for this?
Describe the feature
There are many differences between existing boilerplate and generic modules. Some of them use "require" others "import", some of them use "index.js" others "main.js" as entry point. So it's not really clear for beginners. For example "config.js" file is used to declare config fields in generic-tcpudp module but this file doesn't exist in the "template-js" structure (conf fields are declared in the "main.js" file) ...
Usecases
. Use boilerplate as starting module development point . Same folder/structure from boilerplate to generic modules . Clearest module dev for beginners . copy features from generic modules to in dev module