meteorite - What options are there for creating universally accessible javascript functions (on the client side) in Meteor? -


i'm starting out meteor @ moment. js based project, helps have little algorithm library somewhere contains handy basic functions invoke throughout project code.

i'm still getting head around app infrastructure, wondering 2 things making functions universally accessible across client side: 1) should functions go? 2) framework functionality should use (or used automatically) make them available throughout project?

you should have "client" folder in meteor root application directory. inside it, create "js" directory, , put javascripts files in it. declare global vars , functions way :

myvar=value; myfunction=function(arguments){...}; 

using classic syntax (var myvar=value;) cause symbols local source file. in "js" folder, can play order in scripts loaded (read docs futher details), basically, inside "lib" folder gets loaded first, , inside folders, files loaded using filename alphabetical order.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -