To include the Npm module “tedious” (to access a MSSQL database) I created my first Meteor package, just yesterday. See this post. A private package defined in the “packages” folder of the app. That was actually easier than expected. So I decided to put future functionality, that seems packageable, in such packages.
I decided to look at the source code of some standard packages and found out, that you can use other packages in your package definition. I tried the following:
And it worked like a breeze. I just have to add all “.coffee” files I have in the package and can access globally defined variables form my normal app code. As you might see from the sources I plan to build a very basic fulltext search (n-gram) for my app. I haven’t found anything simple that integrates well with Meteor. Maybe you can point something out.
In case you wonder why I didn’t use Meteorite. Well, I don’t know exactly. I simply didn’t want to go the Meteorite way. I find it questionable that there exists yet another mechanism for the same purpose, and since the Meteor native package system is included and works quite well (for the built in packages), I decided to stick with it and ignore Meteorite and those Atmosphere “Smart Packages”.
I don’t know if this is a wise choice. Time will tell.
Update: Meteor 0.6.5 introduced major changes to it’s package system, consider this updated information.