@garygalbraith
Using namespaces for your Classes should allow you to create the modular structure you are after.
Try defining your Class like:
var MyApp = MyApp || {};
MyApp.MyClass = class {
constructor(param1, param2) {
this.param1 = param1;
this.param2 = param2;
}
method1() {
this.param1 = this.param1 + this.param1;
}
method2() {
this.param2 = this.param2 + this.param2;
}
}
Then create an instance in main() like:
const myInstance = new MyApp.MyClass(3, 5);
This should allow you to name each class uniquely and include them from external files.