I want to add a JavaScript front-end plugin, like jquery.center.js
, to a Meteor app.
If I put it in my app/
directory and refresh the page
One way to do this in MeterorJS 1.3.x
Add the JS files in the public\js\
directory
Load it up from Meteor.startup method using $.getScript in client/main.js If you want to control script load sequence, control with multiple $.getScript for each js files.
Meteor.startup(function(){
$.getScript('js/fhir-client.js', function(){
// script should be loaded and do something with it.
});
});