diff --git a/History.md b/History.md index a067d9aec4..3d6eb26976 100644 --- a/History.md +++ b/History.md @@ -2,6 +2,14 @@ * Log out a user's other sessions when they change their password. +* Move boilerplate HTML from tools to webapp. Changes internal + Webapp.addHtmlAttributeHook API incompatibly. + + +## v0.8.0 + +(Currently being stabilized. Features Blaze.) + ## v0.7.2 diff --git a/packages/appcache/appcache-server.js b/packages/appcache/appcache-server.js index ce579583d2..3d4bec1c4c 100644 --- a/packages/appcache/appcache-server.js +++ b/packages/appcache/appcache-server.js @@ -57,7 +57,7 @@ var browserEnabled = function(request) { WebApp.addHtmlAttributeHook(function (request) { if (browserEnabled(request)) - return 'manifest="/app.manifest"'; + return { manifest: "/app.manifest" }; else return null; }); diff --git a/packages/observe-sequence/package.js b/packages/observe-sequence/package.js index 30be5f0ca5..5009db78d2 100644 --- a/packages/observe-sequence/package.js +++ b/packages/observe-sequence/package.js @@ -7,9 +7,7 @@ Package.on_use(function (api) { api.use('deps'); api.use('minimongo'); // for idStringify api.export('ObserveSequence'); - // XXX this does also run on the server but as long as deps is not - // documented to run there let's not try - api.add_files(['observe_sequence.js'], 'client'); + api.add_files(['observe_sequence.js']); }); Package.on_test(function (api) { diff --git a/packages/star-translate/translator.js b/packages/star-translate/translator.js index 77d08756de..bff404d034 100644 --- a/packages/star-translate/translator.js +++ b/packages/star-translate/translator.js @@ -101,6 +101,9 @@ StarTranslator._writeClientProg = function (bundlePath, clientProgPath) { var clientManifest = { "format": "browser-program-pre1", "manifest": origClientManifest.manifest, + // XXX Haven't updated this for the app.html -> head/body change, but + // surely we don't need to because code in pre-star apps doesn't + // even read this file? "page": "app.html", "static": "static", "staticCacheable": "static_cacheable" diff --git a/packages/webapp/boilerplate.html b/packages/webapp/boilerplate.html new file mode 100644 index 0000000000..a4fb29f8fb --- /dev/null +++ b/packages/webapp/boilerplate.html @@ -0,0 +1,22 @@ + + +{{#each css}} {{/each}} + +{{#if inlineScriptsAllowed}} + +{{else}} + +{{/if}} +{{#each js}} +{{/each}} +{{#if inlineScriptsAllowed}} + +{{else}} + +{{/if}} +{{{head}}} + + +{{{body}}} + + diff --git a/packages/webapp/package.js b/packages/webapp/package.js index fab6a96434..2a50bf1aef 100644 --- a/packages/webapp/package.js +++ b/packages/webapp/package.js @@ -8,7 +8,9 @@ Npm.depends({connect: "2.9.0", useragent: "2.0.7"}); Package.on_use(function (api) { - api.use(['logging', 'underscore', 'routepolicy'], 'server'); + api.use(['logging', 'underscore', 'routepolicy', 'spacebars-compiler', + 'spacebars', 'htmljs'], + 'server'); api.use(['underscore'], 'client'); api.use(['application-configuration', 'follower-livedata'], { unordered: true @@ -21,5 +23,10 @@ Package.on_use(function (api) { api.export(['WebApp', 'main', 'WebAppInternals'], 'server'); api.export(['WebApp'], 'client'); api.add_files('webapp_server.js', 'server'); + // This is a spacebars template, but we process it manually with the spacebars + // compiler rather than letting the 'templating' package (which isn't fully + // supported on the server yet) handle it. That also means that it doesn't + // contain the outer "