rolo-meteor-client-bundler
v0.6.0
Published
Bundles Meteor client-packages into a single module
Downloads
4
Readme
Meteor Client Bundler
meteor-client-bundler
is a module bundler which will take a bunch of Atmosphere package and put them into a single module, so we can load Meteor's client scripts regardless of what framework we're using to run our server. This project was originally created due to Ionic2CLI-Meteor-Whatsapp and the urge to combine both Ionic along with Meteor, so we can enjoy Ionic's great client and Meteor's powerful DDP client.
API
Bundling
$ meteor-client bundle
- -s, --source [source-dir] - A path for a Meteor project which already exists. This is useful if you want the bundled packages to have the same versions as in the specified project. If not specified, the packages specified in the config under the
import
field will be used instead. - -d, --desination [destination-file] - The path for the bundled module. Defaults to
node_modules/meteor-client.js
. - -c, --config [config-file] - The path for the bundler config file. Defaults to
meteor-client.config.json
. An example config can be found in the examples section. The config can contain the following fields:- runtime - Meteor’s runtime config. Most commonly used to set the URL of the Meteor server we would like to interface with, which defaults to
localhost:3000
. - import - A list of packages we would like to include in our bundle. Will most likely contain the
meteor-base
package, as it’s the core file of Meteor’s client, and without it, there will be no Meteor whatsoever.
- runtime - Meteor’s runtime config. Most commonly used to set the URL of the Meteor server we would like to interface with, which defaults to
- --url [connection-url] - DDP default connection URL.
- --packs-dir [packages-dir] - Export
METEOR_PACKAGE_DIRS
. Defaults to thepackages
directory under the root directory of the project. For more information, see reference. - -r, --release [meteor-release] - Use a specific release of Meteor. Defaults to the globally installed release or the one used in the specified source directory.
Example
Command
$ meteor-client bundle --destination meteor.bundle.js --config bundler.config.json
Config
{
"release": "1.5.2",
"runtime": {
"DDP_DEFAULT_CONNECTION_URL": "http://1.0.0.127:8100"
},
"import": [
"accounts-base",
"mys:accounts-phone",
"jalik:[email protected]_1",
"jalik:[email protected]"
],
"npmPackages": []
}
Integrating With React Native
See React Native Meteor Boilerplate.
Integrating with Angular CLI
See Angular CLI - Meteor Example
License
MIT