我正在编写自己的包,我需要依赖dburles:mongo-collection-instances
. 我知道集合实例包会修改Mongo.Collection
对象,但我看不到Mongo.Collection.getAll()
在我的自定义包中使用。
var collections = Mongo.Collection.getAll(); // Doesn't work
console.log('collections', collections);
我的package.js
:
Package.onUse(function(api) {
api.versionsFrom('1.0.3.1');
api.use('jquery');
api.use('mongo');
api.use('session');
api.use('matb33:collection-hooks');
api.use('dburles:mongo-collection-instances');
api.use('accounts-base', ['client', 'server'], {weak: true});
...
});