I have created a Meteor package for jQuery, simply by downloading the jQuery files from their website and including them in a Meteor package formatted like so:
Package.onUse(function(api) {
api.versionsFrom('1.0.3.1');
api.addFiles('jquery-2.1.3/jquery-2.1.3.js','client');
});
Package.onTest(function(api) {
api.use('tinytest');
api.use('jquery-2.1.3');
api.addFiles('jquery-2.1.3-tests.js');
});
I am having issues getting this to work without error, i.e. I get an ‘undefined is not a function’ error.It may be because the meteor-platform package adds jQuery by default, so causing a conflict. Can someone confirm whether:
- it is possible to have a version of jQuery in my Meteor project other than the one installed by meteor-platform and,
- if so, how to go about it?