Commit Graph

30 Commits

Author SHA1 Message Date
Nick Martin
afc45d8386 Add space between function and ( per style guide.
No functional changes.
2014-10-07 13:53:25 -07:00
Nick Martin
ee65d21699 Run appcache size check after user code has had a chance to run.
This way the size check takes calls to Meteor.AppCache.config()
into account, so users can remove files from the cache and get
rid of the warning.

Also, add an internal option to totally disable the warning and
use it in tests.
2014-10-07 13:53:25 -07:00
Gaelan
9e6568a3e1 Fix clientHash call in appcache.
Appcache was broken because it output the *function* WebApp.clientHash instead of its return value.
2014-10-07 13:53:25 -07:00
Matthew Arbesfeld
71966f407a Turn off auto-reload. Still not able to remove initial script from page 2014-07-29 04:38:46 -07:00
Matthew Arbesfeld
960f8907d3 Merge branch 'packaging' into cordova-hcp
Conflicts:
	packages/constraint-solver/constraint-solver.js
	packages/webapp/webapp_server.js
	tools/tests/package-tests.js
2014-07-25 13:52:34 -07:00
Slava Kim
5649b0347f Bundle and serve all client programs by default
For several client programs 'client.browser', 'client.cordova', etc, build and
bundle manifest files and programs.

Then serve all client programs' static files on their subpaths except for the
default one served on root.

Ex.:

/app/code.js
/packages/client-package/code.js
/cordova/packages/cordova-package/code.js
2014-07-24 17:39:11 -07:00
Fredric Endrerud
effd3c1524 Change AppCache from browser whitelist to blacklist 2014-07-18 16:07:02 -07:00
David Glasser
b2632d45c5 Move boilerplate HTML from tools to webapp
This breaks a strong dependency between the webapp package and the
bundler.  Now we can change the standard page format, add more hooks,
etc without changing the tools (and hot code push works properly).

This is an incompatible change to the definition of the
browser-program-pre1 format: it no longer contains a "page" field
pointing to a boilerplate defined using ad hoc ##FOO##
substitution. Instead, the manifest can contain "head" and "body"
entries for data added with compileStep.appendDocument().  (Note that in
Blaze, <body> in a template file no longer calls appendDocument.)

WebApp.addHtmlAttributeHook callbacks now return attribute objects (like
those that Spacebars supports) rather than strings.
2014-03-24 20:10:39 -07:00
Nick Martin
980a669c45 Make appcache size check actually match what goes in the cache section. Fixes #1847. 2014-02-20 14:57:57 -08:00
Nick Martin
51b3cef688 Whitespace adjustments to match style guide. 2013-12-06 22:41:46 -08:00
Nick Martin
1eff62f0f3 Only count files that actually go in the cache in the cache size check. Fixes #1653. 2013-12-06 14:10:19 -08:00
Nick Martin
91ad6c0189 Remove trailing whitespace. 2013-12-05 13:14:10 -08:00
Nick Martin
f25b733bc6 Change AutoUpdate symbol name to be one word not two.
perl -pi -e 's/AutoUpdate/Autoupdate/g' **/*.{js,md}
perl -pi -e 's/autoUpdate/autoupdate/g' **/*.{js,md}
2013-11-21 16:34:07 -08:00
Andrew Wilcox
e27e2d8c82 Calculate the client hash in webapp so that autoupdate doesn't have to
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.
2013-11-19 01:34:53 -08:00
Andrew Wilcox
e48fa460bc Implement AutoUpdate.newClientAvailable reactive data source.
Have the appcache use the auto update client version id.

Fix autopublish warning.
2013-11-19 01:34:53 -08:00
Andrew Wilcox
ba34b2550b Chrome for iOS supports the appcache 2013-09-04 16:31:52 -07:00
David Glasser
e38bf5e1ab Move a few more functions off of __meteor_bootstrap__ 2013-07-02 16:15:12 -07:00
David Glasser
1f26045fe0 __meteor_bootstrap__.bundle -> WebApp.clientProgram 2013-07-02 16:15:12 -07:00
David Glasser
053db8e9e9 Begin to refactor webapp package.
Move stuff from __meteor_bootstrap__ to WebApp exported symbol.

Note that the WebApp API continues to be subject to change.
2013-07-02 16:15:12 -07:00
David Glasser
e2951cca6c Fix routepolicy/webapp dependency.
Inspired by awwx's #1176.

Move Meteor._routePolicy to @exported RoutePolicy.
2013-07-02 15:11:45 -07:00
Andrew Wilcox
f4808b5a68 Add Chromium to the browsers supported by appcache 2013-04-25 16:50:33 -07:00
David Glasser
599c6edef8 Another round of removing __meteor_bootstrap__.require. 2013-03-19 15:13:53 -07:00
David Glasser
5a5204e3a4 Remove closures around package files. (hint: git blame -w)
The bundler now adds closures around client files and the server adds closures
around server files.
2013-03-19 15:13:53 -07:00
Nick Martin
b2bf406e55 Only cache assets with a cache-busting parameter. Use fallback to access these when offline. 2013-03-06 16:41:56 -08:00
Andrew Wilcox
f72f366e20 appcache docs and tweak warning message 2013-02-22 18:38:41 -08:00
Andrew Wilcox
43282254a1 Fix syntax error in appcache-server.
Ouch.
2013-02-21 18:41:53 -08:00
Andrew Wilcox
2500312cd5 Allow static resources to be configured as online only.
Add a route policy type "static-online" for files in public/ that
shouldn't be cached offline.

Put "static-online" files in the manifest NETWORK section instead of
in the CACHE section.
2013-02-21 18:41:53 -08:00
Andrew Wilcox
6ed6e8ce17 appcache code review changes 2013-02-21 18:41:53 -08:00
Andrew Wilcox
6bea9656d6 Avoid calling readFileSync at runtime. 2013-02-21 18:41:53 -08:00
Andrew Wilcox
9c55aeeb97 appcache package
This code depends on PR 680.  In addition, the docs include a link to
the proposed AppCache wiki page.

Adds the appcache smart package and associated documentation.

QA notes are in packages/appcache/QA.md (Is this a good place to put
them?)
2013-02-21 18:41:53 -08:00