Meteorite is a Meteor version manager and package manager. It provides an easy way to run different versions of meteor, use non-core packages, and to install packages from the Atmosphere package repository. Meteorite provides the mrt
command that wraps the meteor
command, and should be used in its place.
# Create an app based on Meteor's devel branch.
$ mrt create my-app --branch devel
$ cd my-app
# Install an Atmosphere package, recursively fetching dependencies.
$ mrt add router
# Check for and install any updates, and run the app.
$ mrt
Meteorite can be installed via npm.
$ sudo npm install -g meteorite
-
Meteor is not officially supported on windows; you can run it thanks to Tom Wijman's excellent work. However, meteorite's git based approach runs counter to the MSI installation that's required to get it working. So meteorite does not work under windows right now. Pull Requests which change this would be gladly accepted!
-
Meteorite does not work on Ubuntu 12.04's default Node.js v0.6 (issue #67). To fix this, install a recent version of Node.js via this PPA or by compiling from source.
-
You'll also need to ensure you have git installed and available in your path.
Works like meteor create
, but you can specify the desired branch, tag or reference of Meteor's git repository that the app should be based on.
# By default, apps are based on Meteor's master branch.
$ mrt create cool-app
# You can create apps based on a branch of Meteor's repo.
$ mrt create risky-app --branch devel
# Or, on a tag (such as version numbers).
$ mrt create safe-app --tag v0.5.4
# Or, or on a commit.
$ mrt create choosy-app --ref a9a717
Works like meteor add
, but if the package isn't one of Meteor's included packages, it installs it from Atmosphere.
Unlike meteor add
, only one package can be added at a time with mrt add
.
# Add the latest version of the moment package on Atmosphere.
$ mrt add moment
# Add a specific version of a package.
$ mrt add router --version 0.3.4
# Meteorite will install page.js too, because router depends on it.
Works like meteor run
, but checks and installs the app's desired Meteor version and package dependencies before running the app.
Installs any available updates to the app's desired Meteor version and packages.
When Meteorite is executed for an app, it checks or installs the app's desired Meteor version, packages and dependencies, then does the required book-keeping (described below), and finally passes the command onto meteor
.
However, these checks takes time to send requests to remote servers. It only really makes sense to check the app's dependencies when running the create
, run
, add
or update
commands. For other commands, there's no need. Therefore, you'll likely want to stick with using meteor
other commands like list
, bundle
or deploy
.
Apps tell Meteorite the Meteor version and packages they want with a file called smart.json
in their root directory. Meteorite will install those dependencies the next time it is executed within that app.
Meteorite writes to a smart.lock
file in the app's root directory to track the exact versions of its dependencies, even when it's set up in a fresh environment. You should check the smart.lock
file into your app's version control, to ensure that other developers are running the same versions of the dependencies. Any changes in smart.json
take precendency over smart.lock
. The smart.lock
file is reset with the mrt update
command.
The meteor
property is not required: apps will depend on Meteor's master branch by default. You can specify meteor.branch
, meteor.tag
or meteor.git
to use alternate branches, tags and forks respectively.
{
"meteor": {
"tag": "v0.5.4"
},
"packages": {
"moment": {},
"router": "0.3.4",
"roles": {
"version": "1.0.1"
},
"accounts-persona": {
"git": "https://github.com/vladikoff/meteor-accounts-persona"
},
"normalize.css": {
"git": "https://github.com/rithis/meteor-normalize.css",
"tag": "v2.0.1"
},
"my-experiment": {
"path": "/path/to/local/package"
}
}
}
Meteorite packages include a smart.json
file in their root directory to provide information about the package, and to list their dependencies. For an example, see Meteor Router's smart.json
.
Meteorite packages also include a package.js
file in their root directory to tell Meteorite how it should be installed. For an example, see Meteor Roles' package.js
.
See Atmosphere's documentation on writing packages for more information.
Contributions to meteorite are very welcome! Please see the Contribution Guide for details.