Skip to content Skip to sidebar Skip to footer

Use Meteor Js To Write Command Line Tool?

According to meteor documentation, a fundamental webapp package is installed every time you run meteor create to provide the 'webapp' functionality in your meteor app. The documen

Solution 1:

Yes you can, every meteor app needs a main function and if you use meteor-platform, the webapp package will be automatically added which includes a main. You can remove meteor-platform, which is a wrapper package that does api.imply of all the core meteor packages, and add the packages you need from meteor manually, such as mongo, tracker, etc., and then add a main function.

I have written a blog post about writing command line programs with meteor:

http://practicalmeteor.com/writing-command-line-programs-with-meteor/

In addition, as part of writing many command line programs with meteor, we created the pracitcalmeteor:mcli package which provides you with some nice extras, including command registration, command line options and argument parsing, and tools to run your commands in development mode, where command line parsing is not possible out of the box. Let me know how it works for you.

Cheers, Ronen

Post a Comment for "Use Meteor Js To Write Command Line Tool?"