Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meteor 0.9.4 support #151

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions lib/router_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,8 @@
}

if (typeof Handlebars !== 'undefined') {
if (isBlaze()) {
UI.body[pathName] = _.bind(self[pathName], self);
UI.body[urlName] = _.bind(self[urlName], self);
} else {
Handlebars.registerHelper(pathName, _.bind(self[pathName], self));
Handlebars.registerHelper(urlName, _.bind(self[urlName], self));
}
Handlebars.registerHelper(pathName, _.bind(self[pathName], self));
Handlebars.registerHelper(urlName, _.bind(self[urlName], self));
}
}

Expand Down Expand Up @@ -183,10 +178,4 @@

Meteor.Router = new Router();
Meteor.startup(function() { page(); });

// returns true if current release of Meteor is released with new template
// rendering engine called "Blaze"
isBlaze = function() {
return !!Package.ui
}
}());
14 changes: 3 additions & 11 deletions lib/router_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ if (typeof Handlebars !== 'undefined') {
name = Meteor.Router.page();

if (Template[name]) {
if (!isBlaze())
return new Handlebars.SafeString(Template[name](this));
else
return Template[name].extend({ data: this });
return Template[name].extend({ data: this });
}

return null;
Expand All @@ -17,11 +14,6 @@ if (typeof Handlebars !== 'undefined') {
return Meteor.Router.page();
};

if (!isBlaze()) {
Handlebars.registerHelper('renderPage', renderPage);
Handlebars.registerHelper('currentPage', currentPage);
} else {
UI.body.renderPage = renderPage;
UI.body.currentPage = currentPage;
}
Handlebars.registerHelper('renderPage', renderPage);
Handlebars.registerHelper('currentPage', currentPage);
}
12 changes: 8 additions & 4 deletions package.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
Package.describe({
summary: "A reactive router built on page.js"
summary: "A reactive router built on page.js",
version: '0.6.1',
git: 'https://github.com/tmeasday/meteor-router.git'
});

Npm.depends({
'connect': '2.9.0'
});

Package.on_use(function (api, where) {
api.versionsFrom('[email protected]');
api.use('deps', 'client');
api.use('startup', 'client');
api.use('templating', 'client');
api.use('handlebars', 'client');
api.use('page-js-ie-support', 'client');
api.use('tmeasday:page-js-ie-support@1.3.5', 'client');
api.use('underscore', ['client', 'server']);

// for backward compat before Meteor linker changes
if (typeof api.export !== 'undefined') {
api.use('webapp', 'server');
api.use('ui', 'client', {weak: true}); //For helpers
api.use('HTML5-History-API', 'client', {weak: true});
// Disabled to not cause errors on Meteor < 0.8
//api.use('ui', 'client', {weak: true}); //For helpers
api.use('tmeasday:[email protected]', 'client', {weak: true});
}

api.add_files('lib/router_client.js', 'client');
Expand Down
12 changes: 0 additions & 12 deletions smart.json

This file was deleted.

25 changes: 0 additions & 25 deletions smart.lock

This file was deleted.