node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


Pack Meteor

This is a simple CLI for packaging the Meteor client into a folder. Its useful when creating Chrome Packaged Apps but can also be used with Cordova.


Quick demo of packmeteor


$ npm install packmeteor


Rig a Meteor app on localhost:3000 and install the packmeteor package


There are at the moment only two, but common helpers on the client-side api. Packmeteor.cordova.isReady() - reactive status of the cordova - not reactive but useful testing for chrome packaged apps.


Packmeteor.addFile(url) - can add local files, mainly used if a cordova plugin needs to be added manually.

Chrome packaged apps

Create packaged app folder:

$ packmeteor -c hello

Autobuild and reload Chrome Packaged App on Meteor hotcode push:

$ cd hello
$ packmeteor -ar

NOTE: Chrome + Mac OS X -> Close the Chrome before running the script. Current chrome requires manual refresh of the app, goto chrome://extensions/ and click "update"


Autobuild Cordova:

packmeteor -ae

This will autopackage and update android emulator, run packmeteor from the www folder in cordova

Directly from filesystem

Run the packaged client app without server: Simply open the index.html from finder / file explorer


$ packmeteor --help
  Usage: packmeteor [options]
    -h, --help                        output usage information
    -V, --version                     output the version number
    -c, --create <name>               Create Packaged App
    -a, --autobuild                   Auto build on server update
    -r, --reload                      Reload app
    -b, --build [url]                 Client code url [http://localhost:3000]
    -s, --server <url>                Server url, default to build url [http://localhost:3000]
    -t, --target [packaged, cordova]  Target platform, default is autodetect
    -e, --emulate [platform]          Reload emulator [android]
    -d, --device [platform]           Reload device [android]
    -m, --migration                   Enable Meteor hotcode push

Build from server

The script packages the app from the Meteor app at localhost:3000 (default) Use -b for building the app from this location instead.

Connection client to server

The packaged client is mounted to the same server as the build server or current ip if could be found. But there may be cases where the client should connect to a different server. Use -s

Kind regards Morten, aka @raix