Meteor NPM package authors: how do you depend on an atmosphere package?

Is it possible? Do you just thrown an error message if some global isn’t available in your code?

I’m writing a package that requires/uses a meteor atmosphere package. I’ve started writing it as a regular meteor package but I keep finding myself wanting to do it as an NPM package for various reasons.

1 Like

Hi @peter.roehlen which reasons ?

Hi, it was mostly around the fact I’ve got a somewhat complex build process and wanted to use grunt. Having grunt tasks competing with the Meteor build tool didn’t seem right.

In any case, I hoisted my source code up a level in the folder structure and I now use grunt to build the package contents folder (where the meteor build tool takes over) so the immediate issue went away. But I’m still curious about the question in the op.

@peter.roehlen is it possible to isolate your npm package without any meteor package dependency, build it with grunt, publish it, integrate this new package in a meteor package with the other meteor package ?
Can you give us a little more information on the packages you are using ?

Hi thanks for the reply, but I moved forward with the solution I posted above. I know the issue is going to come up again which is why I posted the question in the op.

Maybe when Meteor itself can be installed as an npm package, over time we’ll get more common packages published as npm modues too so it will be trivial to declare these dependencies in an npm-published package.

Cheers