Meteor.js Course - Special folders and file load order
-
Upload
pablo-farias-navarro -
Category
Technology
-
view
377 -
download
2
Transcript of Meteor.js Course - Special folders and file load order
Special Folders and File Load Order
Learning Goals
• Special folders in Meteor
• Loading order of files in a project
Special folders• client• server• public (top-level)• private (top-level)• client/compatibility• tests • node_modules• packages
Variables• Local variables: var myVariable = 1;
•Global variables: myVariable = 1;
Loading order1) HTML templates go first2) main.* are loaded last3) Files inside any /lib folder goes next4) Files with deeper path are loaded first5) Files are loaded in alphabetical order of the
entire path
Examplemain.htmllisting.htmlclient/main.jsclient/utils.jsclient/lib/helpers.jslib/tools.jslib/users/advanced.js
Example - Solutionlisting.htmlmain.htmlclient/lib/helpers.jslib/users/advanced.jslib/tools.jsclient/utils.jsclient/main.js
Lesson Summary
• Special folders: client, server, public, private
• HTML files are combined in one document
• CSS and JS are minified and concatenated in production
• Loading rules: http://docs.meteor.com/#/full/structuringyourapp