Meteor.js Course - Special folders and file load order

9
Special Folders and File Load Order

Transcript of Meteor.js Course - Special folders and file load order

Page 1: Meteor.js Course - Special folders and file load order

Special Folders and File Load Order

Page 2: Meteor.js Course - Special folders and file load order

Learning Goals

• Special folders in Meteor

• Loading order of files in a project

Page 3: Meteor.js Course - Special folders and file load order

Special folders• client• server• public (top-level)• private (top-level)• client/compatibility• tests • node_modules• packages

Page 4: Meteor.js Course - Special folders and file load order

Variables• Local variables: var myVariable = 1;

•Global variables: myVariable = 1;

Page 5: Meteor.js Course - Special folders and file load order

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

Page 6: Meteor.js Course - Special folders and file load order

Examplemain.htmllisting.htmlclient/main.jsclient/utils.jsclient/lib/helpers.jslib/tools.jslib/users/advanced.js

Page 7: Meteor.js Course - Special folders and file load order

Example - Solutionlisting.htmlmain.htmlclient/lib/helpers.jslib/users/advanced.jslib/tools.jsclient/utils.jsclient/main.js

Page 8: Meteor.js Course - Special folders and file load order

Lesson Summary

Page 9: Meteor.js Course - Special folders and file load order

• 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