Reputation: 111
Is it possible to get a list of all available packages and their configuration within a running MeteorJS app.
I don't mean the CLI command meteor list
but something that could let me check if certain packages are available or not and change the programs behaviour accordingly.
Upvotes: 0
Views: 43
Reputation: 15442
Yes.
Using code from the meteorhacks SSR package as an example, you can see that it does this to check for the existence of the Jade package:
if(Package['mquandalle:jade-compiler']) {
Compilers.jade = Package['mquandalle:jade-compiler'].JadeCompiler;
}
The caveat is that the other package has to be added first.
Upvotes: 1