mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
be a strong dependency of appcache. Delaying publishing the current client version document until the auto update version is available isn't necessary because the publish callback won't be called before webapp starts listening, and that happens after startup. In the app cache manifest include both the client hash and the AUTOUPDATE_VERSION, which both allows the browser to load new client code even when the auto update version is explicitly set by the developer, and also ensures that if the developer changes the auto update version this is propagated to the client in the app HTML so that autoupdate doesn't get into an infinite loop of reloads.
14 lines
397 B
JavaScript
14 lines
397 B
JavaScript
Package.describe({
|
|
summary: "Enable the application cache in the browser"
|
|
});
|
|
|
|
Package.on_use(function (api) {
|
|
api.use('webapp', 'server');
|
|
api.use('reload', 'client');
|
|
api.use('routepolicy', 'server');
|
|
api.use('underscore', 'server');
|
|
api.use('autoupdate', 'server', {weak: true});
|
|
api.add_files('appcache-client.js', 'client');
|
|
api.add_files('appcache-server.js', 'server');
|
|
});
|