webapp package if you don't want a web server); an
Assets facility for static server-side assets such as data files; and much more.
To update an existing Meteor application to 0.6.5, run
meteor update inside the application's directory. If you're new to Meteor, get started on OS X or Linux by running
$ curl https://install.meteor.com | /bin/sh
in your terminal window.
There's too much in this release to go into great detail here but here are the highlights. Full release notes are available in GitHub.
Namespacing and Modules
Meteor's solution is simple. Each app or package gets its own namespace. Use global variables as much as you want: Meteor generates a wrapper around your code so that they are "global" only to the app or package that defined them. File-scope variables are supported too (just declare them with the 'var' keyword.) And when you use a package, you can see its public exports (and only its public exports) in all of the files in your app. In other words, just use 'meteor add' to add packages and everything just works how you'd expect.
Package authors, we think you'll find this a breath of fresh air. App authors, you don't need to do anything! We're preserved the zero-friction 'meteor add' workflow that you love, while keeping clutter out of your namespace.
Meteor Core has always been made of independent, modular packages, that can be used separately or together —
livedata, a client and server for the DDP data sync protocol;
deps, an ultra-lightweight reactivity system;
spark, a library for updating DOM nodes in realtime as data changes. But up until now, the core Meteor stack was automatically included in every Meteor app.
That changes today. After updating your app to Meteor 0.6.5, you'll see a new package in your project —
standard-app-packages. This pulls in the standard packages that used to be included in every app by default. Now, if you want to pick and choose which parts of Meteor Core you'd like to include, you can remove
standard-app-packages and add back in whichever parts you want for a fully modular Meteor experience.
Since Meteor is just a collection of packages, you can even take out the HTTP server by removing the
webapp package. That lets you write command-line tools, DDP clients, and server daemons that don't include a web server at all.
Limitations: Build system support is still a little rough for command-line apps, but we are already using it extensively inside MDG and it will improve over the coming releases. And some of the core packages have more interdependencies than they should, so not every possible combination may work yet, but this too will continue to improve.
To celebrate this transition we've also begun the process of renaming APIs out of the
Meteornamespace. For example,
Meteor.http.get is now
Meteor.connect is now
DDP.connect. See History.md for the full details. The old names are supported for backwards compatibliity.
Meteor's build system now has first-class, end-to-end support for source maps. A source map is tracked for each file as it works its way through each stage of the build pipeline. Source maps are used to decode server-side exceptions and (in development mode only) source maps are served to browser-side debuggers that support them.
That means that if you like CoffeeScript, just add the
coffeescript package, drop a
.coffeefile into your application, enable source maps in your browser's debugger, and enjoy source-level CoffeeScript debugging on the client and CoffeeScript stack traces on the server.
It all just works! And not just for CoffeeScript, but for any build plugin that you add to your Meteor project.
The new build system also includes a long-overdue omission: server-side data files. Just put any extra data files used by your server in a
private directory at the top of your app, and the build system will bundle them up along with your code and make them available through the
AssetsAPI. We'd like to eventually support this API in the browser as well. Let us know if that's a priority for you.
A lot has landed in 0.6.5. See the full change log athttps://github.com/meteor/meteor/blob/devel/History.md.
Package authors will want to check out the new Writing Packages section of the docs for information about exporting symbols, creating build plugins, and new package system features such as weak and implied package dependencies.
Thanks to GitHub users btipling, mizzao, timhaines and zol for their patches.