What's The Correct Way To Use Script Files From Other Script Files Meteor?
According to an answer to this question and the Meteor documentation, Meteor will automatically include all scripts in a package folder structure recursively with the deepest first
Solution 1:
As I suspected, this was related to my misunderstanding of javascript's (goofy hack) class declarations and globals. Changing:
functionClassFoo(){
this.bar = function(){}
}
to
ClassFoo = functionClassFoo(){
this.bar = function(){}
}
fixed it by making ClassFoo global. FWIW, note that var ClassFoo = ...
will NOT work because it then becomes local to the auto-generated closure's namespace. Gotta love javascript's quirks.
Post a Comment for "What's The Correct Way To Use Script Files From Other Script Files Meteor?"