-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Right now exported variables have pretty long names, like this:
var modulesCoreUtilsDataManager = require("modules/core/utils/DataManager");
This was a good design decision to minimize the risk of variable names clashes.
It would be interesting though to have an option to support shorter variable names, like this:
var DataManager = require("modules/core/utils/DataManager");
though this would require quite a bit of work to minimize the risk of collisions, in cases like this:
var modulesUtilsFooBar = require("modules/utils/foo/Bar");
var modulesSthelseBar = require("modules/sthelse/Bar");
This is unlikely but may happen and with a naive approach both requires would have been saved into the same variable.
Also, the variable created by require could perhaps be redeclared later in the code as a local variable in the methods of a tplscript/controller and this could also break things.
Metadata
Metadata
Assignees
Labels
No labels