dayuloli
dayuloli

Reputation: 17021

Correct way to use Meteor with Modernizr

What is the correct way to use Meteor with Modernizr?

  1. I'd like to use modernizr-meteor, but don't know how it works or how to customize it. Do I simple get a custom build off modernizr, and then merge the js file with the latests yepnope.js
  2. Since Modernizr needs a no-js class in the html, I can simply add the class in on startup.

in /lib/startup.js

Meteor.startup(function() {
   $('html').attr('class', 'no-js');
});

Upvotes: 1

Views: 1091

Answers (1)

Dan Dascalescu
Dan Dascalescu

Reputation: 152046

The correct way to use 3rd party libraries with Meteor is to install them from Meteor's package repository, Atmosphere.

A search for Modernizr reveals two packages. As a rule, packages with mrt in the organization name (the part before :) were automatically migrated, and generally out of date. They should be flagged.

The other package looks like a decent (not ideal) candidate, so you'd run:

meteor add cwaring:modernizr

Upvotes: 6

Related Questions