diff --git a/packages/accounts-base/accounts_client.js b/packages/accounts-base/accounts_client.js index 140cdf1069..dce87edd42 100644 --- a/packages/accounts-base/accounts_client.js +++ b/packages/accounts-base/accounts_client.js @@ -271,13 +271,13 @@ Accounts.loginServicesConfigured = function () { /// HANDLEBARS HELPERS /// -// If our app has a UI, register the {{currentUser}} and {{loggingIn}} +// If our app has a Blaze, register the {{currentUser}} and {{loggingIn}} // global helpers. -if (Package.ui) { - Package.ui.UI.registerHelper('currentUser', function () { +if (Package.blaze) { + Package.blaze.Blaze.registerHelper('currentUser', function () { return Meteor.user(); }); - Package.ui.UI.registerHelper('loggingIn', function () { + Package.blaze.Blaze.registerHelper('loggingIn', function () { return Meteor.loggingIn(); }); } diff --git a/packages/ui/handlebars_backcompat.js b/packages/blaze/backcompat.js similarity index 74% rename from packages/ui/handlebars_backcompat.js rename to packages/blaze/backcompat.js index 78c2aedd2a..03576b5384 100644 --- a/packages/ui/handlebars_backcompat.js +++ b/packages/blaze/backcompat.js @@ -1,7 +1,7 @@ Handlebars = {}; -Handlebars.registerHelper = UI.registerHelper; +Handlebars.registerHelper = Blaze.registerHelper; -Handlebars._escape = UI._escape; +Handlebars._escape = Blaze._escape; // Return these from {{...}} helpers to achieve the same as returning // strings from {{{...}}} helpers @@ -11,3 +11,6 @@ Handlebars.SafeString = function(string) { Handlebars.SafeString.prototype.toString = function() { return this.string.toString(); }; + + +UI = Blaze; diff --git a/packages/blaze/package.js b/packages/blaze/package.js index 82c86e17c0..66fcffd9f2 100644 --- a/packages/blaze/package.js +++ b/packages/blaze/package.js @@ -1,14 +1,15 @@ Package.describe({ - summary: "Meteor UI Components framework", + summary: "Meteor Reactive Templating library", version: '1.0.3' }); Package.on_use(function (api) { - api.export(['Blaze']); + api.export(['Blaze', 'UI', 'Handlebars']); api.use('jquery'); // should be a weak dep, by having multiple "DOM backends" api.use('deps'); api.use('underscore'); // only the subset in microscore.js api.use('htmljs'); + api.imply('htmljs'); api.use('observe-sequence'); api.add_files([ @@ -31,7 +32,8 @@ Package.on_use(function (api) { 'view.js', 'builtins.js', 'lookup.js', - 'template.js' + 'template.js', + 'backcompat.js' ]); }); @@ -41,6 +43,9 @@ Package.on_test(function (api) { api.use('blaze'); api.use('test-helpers'); api.use('underscore'); + api.use('blaze-tools'); // for BlazeTools.toJS + api.use('html-tools'); api.add_files('view_tests.js'); + api.add_files('render_tests.js', 'client'); }); diff --git a/packages/ui/render_tests.js b/packages/blaze/render_tests.js similarity index 100% rename from packages/ui/render_tests.js rename to packages/blaze/render_tests.js diff --git a/packages/showdown/template-integration.js b/packages/showdown/template-integration.js index c34bdcc0f4..05e05522ef 100644 --- a/packages/showdown/template-integration.js +++ b/packages/showdown/template-integration.js @@ -1,10 +1,9 @@ if (Package.templating) { var Template = Package.templating.Template; - var UI = Package.ui.UI; // implied by `templating` - var HTML = Package.htmljs.HTML; // implied by `ui` - var Blaze = Package.blaze.Blaze; // implied by `ui` + var Blaze = Package.blaze.Blaze; // implied by `templating` + var HTML = Package.htmljs.HTML; // implied by `blaze` - UI.registerHelper("markdown", new Template('markdown', function () { + Blaze.registerHelper("markdown", new Template('markdown', function () { var view = this; var content = ''; if (view.templateContentBlock) { diff --git a/packages/templating/package.js b/packages/templating/package.js index 2a0e4c50cb..531b2c1edf 100644 --- a/packages/templating/package.js +++ b/packages/templating/package.js @@ -26,10 +26,10 @@ Package.on_use(function (api) { api.export('Template', 'client'); // html_scanner.js emits client code that calls Meteor.startup and - // UI, so anybody using templating (eg apps) need to implicitly use + // Blaze, so anybody using templating (eg apps) need to implicitly use // 'meteor' and 'ui'. - api.use('ui'); - api.imply(['meteor', 'ui'], 'client'); + api.use('blaze'); + api.imply(['meteor', 'blaze'], 'client'); }); Package.on_test(function (api) { diff --git a/packages/ui/package.js b/packages/ui/package.js index c91480c30f..7c03cc0ae6 100644 --- a/packages/ui/package.js +++ b/packages/ui/package.js @@ -1,42 +1,9 @@ Package.describe({ - summary: "Meteor UI Components framework", + summary: "Meteor UI framework", version: '1.0.0' }); Package.on_use(function (api) { - api.export(['UI', 'Handlebars']); - api.use('jquery'); // should be a weak dep, by having multiple "DOM backends" - // XXX StyleHandler uses $.trim since Safari 4 doesn't support - // `String.trim`. We should just replace this with our own `trim` if - // we want to make jquery a weak dep. - api.use('deps'); - api.use('random'); - api.use('ejson'); - api.use('underscore'); // slight - api.use('ordered-dict'); - api.use('minimongo'); // for idStringify - api.use('observe-sequence'); - - api.use('htmljs'); - api.imply('htmljs'); - api.use('blaze'); api.imply('blaze'); - - api.add_files(['ui.js']); - api.add_files(['handlebars_backcompat.js']); -}); - -Package.on_test(function (api) { - api.use('tinytest'); - api.use('jquery'); // strong dependency, for testing jQuery backend - api.use('ui'); - api.use(['test-helpers', 'underscore'], 'client'); - api.use('blaze-tools'); // for `HTML.toJS` - - api.use('html-tools'); - - api.add_files([ - 'render_tests.js' - ], 'client'); }); diff --git a/packages/ui/ui.js b/packages/ui/ui.js deleted file mode 100644 index 00525475f4..0000000000 --- a/packages/ui/ui.js +++ /dev/null @@ -1 +0,0 @@ -UI = Blaze;