I know how to write Meteor packages but I can't seem to figure out how to have all exports land in my app's namespace, as described in this presentation.
This particular package is specific to an app I'm building, and it exports only one method that can be regarded as a decorator on the app's singleton. I tried api.export('MyApp.myMethod')
but that gives an error native: Bad exported symbol: MyApp.myMethod
.
If I just api.export('myMethod')
, then in the app code I have to call myMethod()
, and that's not namespaced.
Does Meteor have a mechanism similar to Node's var http = require('http');
? Or how can packages export symbols into a given namespace?
MyApp.MyPackage.method()
because that would be a deep export? – Sheffy